fun with nested loops

Chris Angelico rosuav at gmail.com
Wed Aug 31 20:13:22 CEST 2011


On Thu, Sep 1, 2011 at 1:51 AM, Daniel <dalist0 at gmail.com> wrote:
>
> Has anyone an idea on a nice way to write breaks/continues/redos for
> deeply
> nested loops?
>

Do you only ever have one top-level loop that you would be naming? If
so, put that loop into a function and use return instead of break.
Unfortunately that doesn't work for continue.

ChrisA



More information about the Python-list mailing list