python break怎么跳出两层循环(多层循环)?添加标志位

break2 = False
while (True):
    //  省略
    while (True):
        // 省略
        if xxx:
            break2 = True
            break
    if (break2):
        break

转载自:https://blog.csdn.net/Dontla/article/details/103322728

原文地址:https://www.cnblogs.com/hd92/p/14598250.html