[Tutor] Accessing next and previous items during iteration
singletoned at gmail.com
Mon Dec 19 11:49:34 CET 2005
On 18/12/05, Kent Johnson <kent37 at tds.net> wrote:
> Ed Singleton wrote:
> > Is it possible to access the next and previous items during an iteration?
> This just came up on c.l.python. Bengt Richter has a nice generator-based solution.
It's a lovely piece of code as well. Obvious once you've seen it, but
you wouldn't have thought of it before hand.
More information about the Tutor