ray <[EMAIL PROTECTED]> writes:
> for x in container.iterChildren():
> How to skip the first item? It seems that it's a simple question.
> Could somebody help me? Thanks.

First solution:

    c = container.iterChildren()
    c.next()    # skip first item
    for x in c: ...

Second solution:

    from itertools import islice
    for x in islice(container.iterChildren(), 1, None): ...

I like the second solution better but it's a matter of preference.
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to