How can I read range of lines one after another in each iteration, for example the first iteration read the first 7 lines from all .txt files and the next iteration read the