1、格式化浮点数
>>> "%f" % 100 '100.000000' >>> "%.2f" % 100 '100.00' >>> "%f" % 100.35667324 '100.356673' >>> "%.1f" % 100.35667324 '100.4'
2、科学计数法
>>> "%e" % 100 '1.000000e+02' >>> "%.2e" % 100 '1.00e+02'