buz*_*zsh 1 python break while-loop
我正在while循环中编写带有while循环的代码,并且我想知道如果我在内循环中遇到必要的条件,如何突破外循环.
while N <= 8:
while i < 60:
if this:
that
elif this:
that other thing
else:
break
i += 1
if while loop has found the right thing:
N += 1
else:
change conditions
Run Code Online (Sandbox Code Playgroud)
这个break命令只会突破第一个循环,所以我想知道如何简单地打破这两个循环.值得一提的是,所有这些都在另一个for循环中,我不想打破.谢谢.
| 归档时间: |
|
| 查看次数: |
99 次 |
| 最近记录: |