Im trying to loop through a number of N rows at a time in a text file . How do I loop through the whole file for instance say it has 100 rows and print 10 at a time. This is how far I got.
N=10
f=open("data.txt")
for i in range(N):
line=f.next().strip()
print line
f.close()