Whats wrong with my code?


#1

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

#3

#4

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


#5

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


#7

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!