Printing elements of a list splitted on new lines every N items
I need to print my lists on multiple lines every N element without
splitting the original list in smaller lists.
For example, with N = 3
Given this:
MY_LIST = [ 'A', 'B', 'C', 'D', 'E', 'F']
I want python to print THIS:
A B C
D E F
Thank you for your help
No comments:
Post a Comment