摘要:
原博客连接:https://blog.csdn.net/Jerry_1126/article/details/85009810 保留两位小数,并做四舍五入处理 方法一:使用字符串格式化 a = 12.345 print("%.2f" % a) # 12.35 方法二: 使用round内置函数 a = 阅读全文
posted @ 2020-07-20 14:28
qiynet
阅读(1741)
评论(0)
推荐(0)
浙公网安备 33010602011771号