输出a, b 且保留三位小数
a = 2.3456
b = 2.0000
三种方法:
round(a, 3)
'%.3f' % a
Decimal(a).quantize(Decimal('0.000'))
输出a, b 且保留三位小数
a = 2.3456
b = 2.0000
三种方法:
round(a, 3)
'%.3f' % a
Decimal(a).quantize(Decimal('0.000'))
下一篇:Go test 命令行参数
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M