0

I have a text file:

A
B
C
D
E
F
G
H
...

And I want to iterate through this text files lines and asign the values to different arrays:

Array1 = [A,E...]
Array2 = [B,F...]
Array3 = [C,G...]
Array4 = [D,H...]

The first line always corresponds to the first array, second line to second array, until it reaches the 5th line which is added to the first array again and so on.

Tom Pitts
  • 590
  • 7
  • 25
  • Have you tried anything so far that you need help with? – Aurora0001 Oct 09 '16 at 09:51
  • Briefly: use `readlines()`, then [chunk it](http://stackoverflow.com/questions/312443/how-do-you-split-a-list-into-evenly-sized-chunks), then [transpose it](http://stackoverflow.com/questions/17037566/transpose-a-matrix-in-python). – TigerhawkT3 Oct 09 '16 at 09:55
  • I really wish the functionality for marking duplicate threads was better. Like, a lot better. – TigerhawkT3 Oct 09 '16 at 09:55

0 Answers0