5. Reading between lines. help me pls



Oops, try again. Sorry, but I'm gonna need you to refresh the page! Don't worry your code is saved.

i don't know why it is wrong. can somebody help me?
after refreshing the page and try to submit the code, the error message came again.

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


Open the text file, write on a few lines and then run your code again. :slight_smile:


thank you very much. it works.


Traceback (most recent call last):
File "python", line 1, in
IOError: [Errno 2] No such file or directory: 'text.txt'

Keep getting this error


Post your code let's have a look.


Just follow the same instructions I gave to @courseslayer39176,


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