How to continue in nested loops in Python

后端 未结 6 1771
执念已碎
执念已碎 2020-12-09 01:39

How can you continue the parent loop of say two nested loops in Python?

for a in b:
    for c in d:
        for e in f:
            if somecondi         


        
6条回答
  •  攒了一身酷
    2020-12-09 01:56

    Looking at All the answers here its all different from how i do it\n Mission:continue to while loop if the if condition is true in nested loop

    chars = 'loop|ing'
    x,i=10,0
    while x>i:
        jump = False
        for a in chars:
          if(a = '|'): jump = True
        if(jump==True): continue
    

提交回复
热议问题