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\',\'
Python 3+ simple way
lst=['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 ind, smb in enumerate(lst): print(smb, end='') if ind%5 == 4: print('\n')