I want to get a line, a range from 0000 to 9999, that I want to print the following line:
0000 0001 0002 0003 0004 0005 0006 .... 9999
I tried using print "\n".join([str(num) for num in range(0, 9999)]) but couldn’t, I got the following number:
0 1 2 3 4 5 6 ... 9999
I want python to automatically add the prefix 0 , leaving the number of 4-bit digits all the time. can anyone give me a hand? any help was appreciated.
source share