Flu*_*tor 8 python decimal
如何在Python 3中截断小数后的所有数字?
例如,将3.444截断为3.
Mar*_*ers 19
通过将其转换为int:
int
>>> num = 3.444 >>> int(num) 3
小智 6
>>> import math >>> num = 3.4444 >>> math.trunc(num) 3
归档时间:
12 年,8 月 前
查看次数:
22363 次
最近记录: