okay, so im trying to write a program that takes a list of numbers 1 to 1000, reverses them, puts them into a file (my_file), and prints them back into the file. so far, my code looks like this:
new_list = list(range(1001))
my_file = open("text.txt", "w")
for x in (reversed(new_list)):
my_file.write(x)
And, I know im doing something wrong, im just not sure what (although it probably has to do with the last line of coding?)
PS, sorry if this question is worded awfully, this is my first time using stackoverflow to ask a question :)