How to iterate a sequence, with skipping the first item?

Calvin Spealman ironfroggy at gmail.com
Tue Aug 12 02:59:36 EDT 2008


i = iter(container.iterChildren())
i.next()
for x in i:
  ...

On Tue, Aug 12, 2008 at 2:51 AM, ray <hanlray at gmail.com> wrote:
> A container object provides a method that returns an iterator object.
> I need to iterate the sequence with that iterator, but need to skip
> the first item. I can only iterate the whole sequence with:
> for x in container.iterChildren():
> How to skip the first item? It seems that it's a simple question.
> Could somebody help me? Thanks.
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
Read my blog! I depend on your acceptance of my opinion! I am interesting!
http://ironfroggy-code.blogspot.com/



More information about the Python-list mailing list