So, just output the even lines.
i = 1
f = open('file')
for line in f.readlines():
if i % 2 == 0 :
print line
i += 1
6
solved Python. Even-numbered lines in text file
So, just output the even lines.
i = 1
f = open('file')
for line in f.readlines():
if i % 2 == 0 :
print line
i += 1
6
solved Python. Even-numbered lines in text file