类型转换

2017-03-13  本文已影响0人  汤汤汤汤汤雪林
a = '10.12'
int(a)   # 报错ValueError
float(a) # 正确
int(float(a))
上一篇 下一篇

猜你喜欢

热点阅读