My code doesn't show up when i hit submit. It gives me the error message: Traceback (most recent call last):
File "python", line 3, in
IOError: [Errno 2] No such file or directory: 'output.txt'
It does say its correct though, and lets me pass on to the next lesson, so i'm not sure what i'm doing wrong...
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)) my_file.write("/n") my_file.close()