in reply to Rosetta code: Split an array into chunks
>>> def formatter(data, chunksize=3):
return ''.join( (' ' if i % chunksize else '\n') + d
for i, d in enumerate(data))[1:]
>>> print formatter(("a", "bb", "c", "d", "e", "f", "g", "h"), 3)
a bb c
d e f
There is no Extraterrestrial life
There aren't any suitably capable Extraterrestrials
Interstellar travel is too difficult
We're too uncool / not worth the trouble
What do you mean they haven't visited?
Results (571 votes). Check out past polls.