Let's say I have two files A and B
in A I have 100 lines, in B I have 10 lines, I need to do an operation on every 10 lines in A and every 1 line in B.
for example in A, I have following lines a1 a2 ... a10 a11 .. a20 ... a100
in B I have following lines: b1 b2 ... b10
I would like to do an operation on data a1,a2..a10 and b1, and I would like to do the operation again on data a11, a12... a20 and b2.
So the problem is both A and B are very huge, I cannot load them all in memory, so I need to iterate them line by line, but with different speed because 10 lines in A map to 1 line in B. How to do that without preprocessing A to make it with same row size with B?
(I use python 2.7)