方法1:
print("%.2f" % 0.13333)
方法2
print("{:.2f}".format(0.13333))
方法3
round(0.13333, 2)
参考:https://blog.csdn.net/Kerrwy/article/details/82416063
已修改原文中的错误
方法1:
print("%.2f" % 0.13333)
方法2
print("{:.2f}".format(0.13333))
方法3
round(0.13333, 2)
参考:https://blog.csdn.net/Kerrwy/article/details/82416063
已修改原文中的错误
发表回复