1.数字转字符串

i = 123

str = ‘%d’ %i

str即为转换成的字符串

2.字符串转换成数字:

import string 

tt='555'

ts=string.atoi(tt)

ts即为tt转换成的数字

相关文章: