python round()函数的使用 保留指定小数位 四舍五入 # round()函数:保留指定小数位 四舍五入 a=15.3 b=3 c=a/b print(round(c,2)) print(round(3.1415926,3)) 运行结果: 5.1 3.142