Raymond Hettinger added the comment:
Sorry, this has been proposed and rejected previously. One of the
reasons was that the docs already have a C-speed recipe, grouper(),
that shows how to do it with padding and it is even simpler to do it
without padding using only zip() or izip(). Another
New submission from Chris Mellon:
One of the most common requests in c.l.p and #python is a way to break
an iterable up into some particular size chunks. For example, "abcdef"
-> "ab", "cd", "ef". It's pretty easy to write one, but there are a few
subtleties to it (like if you want padding or par