I want to create a list of numbers from 00000 to 99999, and I want to save it in a file. But the problem is that Python removes the leading zeroes, making 00000 just 0. Here's my code.
f=open("numbers","w")
x=00000
y=99999
while y>=x:
zzz=str(x)+'\n'
f.write(zzz)
x=x+1
I want to save these numbers like this:
00000 00001 00002 And so on...
I am new to Python and I would appreciate any help. Thanks.