[Tutor] Group sequence pairwise
Christopher Arndt
chris.arndt at web.de
Sun Feb 25 18:58:21 CET 2007
David Perlman schrieb:
> I found this by "using Google". You should be able to make a simple
> modification (I can think of a couple of ways to do it) to have it
> pad the end with "None". It is 100% iterator input and output.
>
> http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/303279
Yes, this looks just like what I need, thanks for the pointer. I guessed
that the islice function would probably be part of the solution, but I
couldn't quite grok how it works.
Chris
More information about the Tutor
mailing list