python 保留小数

参考:https://www.cnblogs.com/Raymon-Geng/p/5784290.html


float('%.2f' % var)
posted @ 2018-08-13 17:47  一条图图犬  阅读(144)  评论(0编辑  收藏  举报