On Sep 28, 2:08 pm, Mr.SpOOn <[EMAIL PROTECTED]> wrote: > On Sun, Sep 28, 2008 at 8:59 PM, Aaron Castironpi Brady > > <[EMAIL PROTECTED]> wrote: > > Here is a link to someone else's design they asked about on the > > newsgroup a couple weeks ago. > > >http://groups.google.com/group/comp.lang.python/browse_thread/thread/... > > :D > It's always me. > > I think my question is more specific. I need some sort of cycle. > > So if I have a list with A, B, C, D, when I iter over it I need to get > an A after the D.
This one was an easy guess: cycle( iterable) Make an iterator returning elements from the iterable and saving a copy of each. When the iterable is exhausted, return elements from the saved copy. Repeats indefinitely. -- http://mail.python.org/mailman/listinfo/python-list