I get an Error saying that output.txt does not exist yet it passed me

my_list = [i**2 for i in range(1,11)]

my_file = open("output.txt", "r+")

# Add your code below!
for item in my_list:
    my_file.write(str(item) + "\n")



Go to you output.txt tab and type whatever you want (except just spaces) in it. Delete what you typed and hit Save&Submit again. That error should go away.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.