📜  打破所有循环 - Python 代码示例

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

代码示例2
break only stops the loop it is in.
if you want to break out of a while true loop try:
flag = True
while flag:
    for i in range(1000):
        if i == 10:
            flag = False
            break