I am trying to print several lists (equal length) as columns of an table.
I am reading data from a .txt file, and at the end of the code, I have 5 lists, which I would like to print as columns separated but space.
I'll show you a 3-list analog:
>>> l1 = ['a', 'b', 'c'] >>> l2 = ['1', '2', '3'] >>> l3 = ['x', 'y', 'z'] >>> for row in zip(l1, l2, l3): ... print ' '.join(row) a 1 x b 2 y c 3 z
1.4m articles
1.4m replys
5 comments
57.0k users