Advertisement
here2share

# list_zfill.py

Mar 31st, 2015
393
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.18 KB | None | 0 0
  1. # list_zfill.py
  2.  
  3. result=[]
  4. for num in xrange(12):
  5.     result.append(str(num+1).zfill(3))
  6. ### result : ['001', '002', '003', '004', '005', '006', '007', '008', '009', '010', '011', '012']
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement