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\',\'
Just to prove I am really an unreformed JAPH regular expressions are the way to go!
import re q="".join(lst) for x in re.finditer('.{,5}',q) print x.group()