Writing


#1


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")

my_file.close()


#2

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.


#3

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