with escapable() as a:
    for i in range(30):
        with escapable() as b:
            for j in range(30):
                if i * j == 12:
                    b.escape()
if i * j == 40:
    a.escape()
Naming Loops in Python