>百科大全> 列表
怎么查找小数后2位
时间:2025-04-30 23:53:38
答案

可以使用round函数来将小数保留两位。例如:

a = 3.14159

b = round(a, 2)

print(b)

这将输出3.14,即保留小数点后两位。

推荐
© 2025 雅普电脑网