Below is my code. All I am trying to do is write to the file in the format that the code prints. I have tried all sorts and best I can get is the final number 17570 in the file. Clearly something wrong in the f.write, any suggestions? print("creating Table") nums = range(17501, 17570) for i in range(0, len(nums),): print (nums, "1", "1", "1", "1") F = open("new.txt", "w") f.write(nums, "1", "1", "1", "1") Continue reading...