划拓汽车网
您的当前位置:首页python输出怎么保留两位小数

python输出怎么保留两位小数

来源:划拓汽车网


python输出保留两位小数的四种方法:

a = 5.5461

方法一:round(a,2)

方法二:float('%.2f' % a)

显示全文