1、round函数
python的内置函数,用于数字的四舍五入。
round(0.5) # 1.0 round(-0.5) #-1.0
s = 1.23567 result = round(s, 2) print(result) 1.24
上一篇:if在数据库mysql存储中判断的方法
下一篇:数据库mysql存储中的入参出参是什么