1# add zeros to numbers
2>>> n = 4
3>>> print(f'{n:03}') # Preferred method, python >= 3.6
4004
5>>> print('%03d' % n)
6004
7>>> print(format(n, '03')) # python >= 2.6
8004
9>>> print('{0:03d}'.format(n)) # python >= 2.6 + python 3
10004
11>>> print('{foo:03d}'.format(foo=n)) # python >= 2.6 + python 3
12004
13>>> print('{:03d}'.format(n)) # python >= 2.7 + python3
14004