![]() | This construction is more flexible and traditional in Python (and a bit strange...):
while 1: line = ifile.readline() # read a line if not line: break # end of file: jump out of loop # process linei.e., an 'infinite' loop with the termination criterion inside the loop |