so im looking for the correct variable that will end the while loop once the loop reaches the end of the file. Here is my code so far:
file_name = input("Please enter file name: ")
open_file = open(file_name,"r")
while ##variable## != "":
line1 = open_file.readline()
line2 = open_file.readline()
line3 = open_file.readline()
line4 = open_file.readline()
Lets say that my file that i opened looks like this:
Babbage, Charles
10.0 9.5 8.0 10.0
9.5 10.0 9.0
85.0 92.0 81.0
Turing, Alan
10.0 8.0 6.0
10.0 10.0 9.0 9.5
90.0 92.0 88.5
Hopper, Grace
10.0 10.0 8.0
10.0 10.0 9.0 9.5
90.0 92.0 88.0
I need the loop to end as soon as it reads the last line, heres some pseudocode:
#Get first data
#while data is not sentinel
#process the data
#
#
#
#
#Get next data
Hopefully thats clear, i appreciate your help.