Python 格式化

python学习网 2019-01-09 00:57:02

数字前面补0

字符型:

print('23'.zfill(5))

数字型:

print('%011d' % 124)

阅读(6951) 评论(0)