Aug-10-2020, 07:37 PM
Same as the sample code above. Instead of setting line1, line2 directly from the filehandle, set them from a readline().
line1 = fileA.readline() line2 = fileB.readline() while all(line1, line2): # do loop stuff here # at end of loop, read the lines again line1 = fileA.readline() line2 = fileB.readline()