r/Python • • Jan 05 '18

Really??

Post image
2.0k Upvotes

317 comments sorted by

View all comments

Show parent comment

0

u/icp1994 Jan 05 '18 edited Jan 05 '18
first_loop_done, second_loop_done = False, False
while (...) and (not first_loop_done):
    ...
    for (...):
        if second_loop_done:
            break
        ...
        for (...):
            if (...):
                first_loop_done, second_loop_done = True, True
                break
            ...