Asks to reload the page and still doesn't work


#1

Excuse me for not using the template. I think this image will do.


#2

this exercise is a bit buggy, we can overcome this problem by writing to the file first, this will create the file:

# Buggy exercise

# First, create the file
f = open("text.txt", "w")
f.write("Hello World!" + "\n")
f.write("Hello World!!" + "\n")
f.write("Hello World!!!" + "\n")
f.close()
# Then, read the file
my_file = open("text.txt", "r")
print my_file.readline()
print my_file.readline()
print my_file.readline()
my_file.close()

#3

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