When run it produces this error.
Oops, try again. It looks like your file doesn't contain each element from my_list on its own line.
Expected this code to execute, but the output.txt is empty.
my_list = [i**2 for i in range(1,11)] my_file = open("output.txt", "r+") # Add your code below! for i in my_list: my_file.write(str(i)+"\n") my_file.close()