demo_file_readline2.py:
f = open("demofile.txt", "r") print(f.readline()) print(f.readline())
➜ begtut>python demo_file_readline2.py
Hello! Welcome to demofile.txt
This file is for testing purposes.