python 控制字符长度
前导0 四位填充
"{:0>4}".format(random.randint(1, 1))
三位浮点数
'{:.3f}'.format(package['time'])
本文来自博客园,作者:vx_guanchaoguo0,转载请注明原文链接:https://www.cnblogs.com/guanchaoguo/p/18678482
"{:0>4}".format(random.randint(1, 1))
'{:.3f}'.format(package['time'])
本文来自博客园,作者:vx_guanchaoguo0,转载请注明原文链接:https://www.cnblogs.com/guanchaoguo/p/18678482