5. Reading between lines. help me pls


#1



https://www.codecademy.com/courses/python-intermediate-en-OGNHh/1/1?curriculum_id=4f89dab3d788890003000096#


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()
my_file.close()


#2

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


#3

thank you very much. it works.


#4

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

Keep getting this error


#5

Post your code let's have a look.


#6

Just follow the same instructions I gave to @courseslayer39176,


#7

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