Guys, I am stuck at exercise 5: Reading Between the Lines
There are no syntax or code mistakes. When I press on Save and Submit Code, it keeps on telling:
"Oops, try again. Sorry, but I'm gonna need you to refresh the page! Don't worry your code is saved."
And in the console, it says:
Traceback (most recent call last):
File "python", line 1, in
IOError: [Errno 2] No such file or directory: 'text.txt'
This should actually give me the first three lines of text.txt in seperate lines.
I am sure there is no problem with my code:
my_file = open("text.txt", "r") print my_file.readline() print my_file.readline() print my_file.readline() my_file.close()
Replace this line with your code.