【发布时间】:2013-10-08 09:42:26
【问题描述】:
我试图创建一个属性生成器,我必须存储值。我唯一的问题是我存储的是浮点数而不是字符串,但我不知道如何更改它。
score = dtwo/done
print(int (score))
strength=score + initial
myFile = open( name + "'s Strength", 'wt')
myFile.write(strength)
myFile.close()
请帮忙,因为我一无所知....
【问题讨论】:
-
使用
str函数。
标签: python string python-3.x floating-point