1.数字转字符串
i = 123
str = ‘%d’ %i
str即为转换成的字符串
2.字符串转换成数字:
import string
tt='555'
ts=string.atoi(tt)
ts即为tt转换成的数字
posted on 2015-11-20 16:27 雨钝风轻 阅读(1484) 评论(0) 收藏 举报
博客园 © 2004-2025 浙公网安备 33010602011771号 浙ICP备2021040463号-3