摘要:
1、保留小数点后两位 >>> print("{:.2f}".format(3.1415)) 3.14 2、带符号保留小数点后两位 >>> print("{:+.2f}".format(-3.1415)) -3.14 3、不带小数点 >>> print('{:.0f}'.format(2.7)) 3 阅读全文
posted @ 2021-01-22 15:57
十一的杂文录
阅读(1007)
评论(0)
推荐(0)


浙公网安备 33010602011771号