Reading Between the Lines


#1

So, this doesn't really work with me, somehow the lines don'tt get wriiten. Here's the code:
python'''

f = open("text.txt", "w+")
f.write("Hello World!" + "\n")
f.write("Hello World!!" + "\n")
f.write("Hello World!!!" + "\n")
f.close()
my_file = open("text.txt", "r")
my_file.readline()
my_file.readline()
my_file.readline()
my_file.close()

5. Reading Between the Lines
#2

Hi @ultimatecodemaster1,

Does Codecademy pass your submission if you change the three lines that you have as ...

my_file.readline()

... to this? ...

print my_file.readline()

#3

i used his code from earlier,

my_file = open("text.txt", "w+")
my_file.write("Norwegian Blue\n")
my_file.close()


#4

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