Error in the open() function


showing the error that did you create a variable called my_file

Replace this line with your code. 

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


Hmm that's strange :hushed: : Do you have any code apart from this?


no this is the only code some code has to be write in output.txt or not


Did you try after refreshing your browser?


Please provide me with a link to the exercise you are on. :slight_smile:


I have the problem on the "Reading Between the Lines" exercise. I have refreshed the code and even restarted the browser (chrome) and did not work.

The error is in the first line:

my_file = open("text.txt", "r")

Update: Doing the steps of the following post the error was fixed but is a workaround


open the txt file...manually delete its the program again.voila!


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