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
Once (shame on you!)
Twice (shame on me!)
More often than I'd like to be
All the time
Just when answering stupid polls
Who you callin' a fool?
I refuse to vote in this ridiculous poll
Results (433 votes). Check out past polls.