Whats wrong with my code?


It keeps returning an error of:
Traceback (most recent call last):
File "python", line 1, in
IOError: [Errno 2] No such file or directory: 'output.txt'

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



have you found a solution?
This is the easiest one on this site and i cant figure it out.


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


This worked for me, replace "r+" by "w" at first and submit. That should give you an error and then you change it to "r+" again and it should work. Cheers!