📜  跳出2个循环python代码示例

📅  最后修改于: 2022-03-11 14:45:30.947000             🧑  作者: Mango

代码示例1
breaker = False #our mighty loop exiter!
while True:
    while True:
        if conditionMet:
            #insert code here...
            breaker = True 
            break
    if breaker: # the interesting part!
        break   # <--- !