I have a huge data file with a specific string being repeated after a defined number of lines.
counting jump between first two \'Rank\' occurrences. For example the file
7 line of codes:
count = 0 for line in open("yourfile.txt"): if "Rank" in line: count += 1 if count > 1: break elif count > 0: count += 1 print count