I have a list of numbers, and I would like this list to print horizontally. Each 9 elements should print on a new row
I have the list splitting every nine elements, however I am struggling with it transposing
media_list = new_amount_list
nth_item = 9
str_list = [
'{}\t\n'.format(m)
if(((media_list.index(m)+1) % nth_item) == 0)
else
'{}\t'.format(m)
for m in media_list
]
print('\n'.join(str_list))