Using this code:
import string
for i, j in enumerate(string.ascii_uppercase, 1):
print('{}: {}'.format(i, j))
I get the following output:
1: A
2: B
3: C
4: D
5: E
6: F
7: G
8: H
9: I
10: J
11: K
12: L
13: M
14: N
15: O
...
What I am looking for is this:
0: A 5: F ....
1: B 6: G
2: C 7: H
3: D 8: I
4: E 9: J
5: F 10: K
Is there a way to split a long column into smaller ones and print them side by side?
(Note: the example above is simply for illustrating the output. The actual contents printed can be very different)
For Python3 , You can try this function if you need column wise printing -
Please note, the argument
lst
to the above function is the list of what is to be printed.Then call this function using -
This would output -