小编P. *_*lfa的帖子

如何从内循环到外循环的开头

什么是从内循环中断的最好方法,所以我到达外循环的开始

while condition:
    while second_condition:
        if some_condition_here:
            get_to_the_beginning_of_first_loop
Run Code Online (Sandbox Code Playgroud)

现在我有类似的东西

while condition:
    while second_condition:
        if condition1:
            break
    if condition1:
        continue
Run Code Online (Sandbox Code Playgroud)

python

3
推荐指数
1
解决办法
510
查看次数

标签 统计

python ×1