>>> "{0:03d}".format(1)
'001'
>>> "{0:03d}".format(10)
'010'
>>> "{0:03d}".format(100)
'100'
转载于:https://www.cnblogs.com/sthinker/p/7456034.html
>>> "{0:03d}".format(1)
'001'
>>> "{0:03d}".format(10)
'010'
>>> "{0:03d}".format(100)
'100'
转载于:https://www.cnblogs.com/sthinker/p/7456034.html