On Thu, Oct 31, 2013 at 2:29 PM, Ulrich Goebel <m...@fam-goebel.de> wrote:
> Hallo, > > I'm locking for an "iterator" type with not only the .next() method, but > with a .previous(), .first() and .last() method, so that I can through it > from the beginning or from the end, and in both directions, even > alternately (for example two steps forward, one backward, two steps > forward). > I'm thinking maybe you want a list. EG: list_ = list(my_iterator()) i = 0 print list_[i] i += 1 print list_[i] print list_[i-1]
-- https://mail.python.org/mailman/listinfo/python-list