myfile = open("demo.txt", "r") myline = myfile.readline() while myline: print(myline) myline = myfile.readline() myfile.close()