> Alternately, the need can be met with existing tools by pre-padding the > iterator with enough extra values to fill any holes: > > it = chain(iterable, repeat('', group_size-1)) > result = izip_longest(*[it]*group_size)
Typo: That should be izip() instead of izip_longest() -- http://mail.python.org/mailman/listinfo/python-list