i'm making a number list generator and i want to print the output as a list in a .txt file but it always just prints the final value for the variable. here's my code :
zero = ["000000","00000","0000","000","00","0",""] for x in xrange(0,999999): with open("Output.txt", "w") as text_file: text_file.write("011"+zero[len(str(x))] + str(x)+"70")
'011{:06d}70'.format(x)...