format格式化函数


print("{:.2f}".format(3.1415926));
3.14

 出处https://www.runoob.com/python/att-string-format.html

原文地址:https://www.cnblogs.com/yuanlijinqianfan/p/13071135.html