Reading Between the Lines (phython)


print my_file.readline()
print my_file.readline()
print my_file.readline()


In right side window:-

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

downside error

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


This is a known problem, but given the course gets an update soon, it won't be fixed. The forum is full of ways to solve the problem (add additional line in txt file, write to the file first using python code), did you check the forum?


i found the solution , but thx


Click the "Text.txt" tab, in the "Text.txt" file enter some more lines with some more data. System will save the file with name "Text.txt", then execute the actual program.