python float 保留两位小数点
from datetime import timedelta
from decimal import Decimal
percent = success/total
percent = percent*100
percent = Decimal(percent).quantize(Decimal('0.00'))
python float 保留两位小数点
from datetime import timedelta
from decimal import Decimal
percent = success/total
percent = percent*100
percent = Decimal(percent).quantize(Decimal('0.00'))
本文标题:python float 截取
本文链接:https://www.haomeiwen.com/subject/ojjmmrtx.html
网友评论