Demo:

data.txt:

line1 line2 line3 line4 line5 line6 line7 line8 line9 line10 line11 line12 line13

Code:

from itertools import islice with open('data.txt') as f: for line in islice(f, 3, None, 3): print line, # Python3: print(line, end='')

Produces:

line4 line7 line10 line13

Reff