python format

brl=1/2.43
format(brl,'0.4f')#只显示小数点后4位
format(2/3,'.1%’)#显示小数点后一位,百分数
原文地址:https://www.cnblogs.com/liuguangshou123/p/13476981.html