I have a list of unknown number of items, let\'s say 26. let\'s say
list=[\'a\',\'b\',\'c\',\'d\',\'e\',\'f\',\'g\',\'h\', \'i\',\'j\',\'k\',\'l\',\'m\',\'n\',\'
I think the most cleaner way to write this would be
list=['a','b','c','d','e','f','g','h', 'i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] for i in range(0, len(list), 5): print(*list[i:i+5], sep='')