<分区> 分区>
我想用小数点后 2 位格式化我的 float 。
>>> x =5.0 >>> y=float("{:0.2f}".format(x)) >>> y 5.0
我想要这种格式的输出:
5.00