On 18/12/05, Kent Johnson <[EMAIL PROTECTED]> 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. > http://groups.google.com/group/comp.lang.python/browse_thread/thread/2e4533f108fbf172/90d87c91dac844d3?hl=en#90d87c91dac844d3
That's perfect! 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. Thanks Ed _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor