fun with nested loops

Chris Angelico rosuav at
Wed Aug 31 14:13:22 EDT 2011

On Thu, Sep 1, 2011 at 1:51 AM, Daniel <dalist0 at> 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.


More information about the Python-list mailing list