使用嵌套 for 循环时,如果我在内部嵌套 for 循环中使用 continue,则 continue 的范围仅适用于内部循环还是会继续外部循环?
注意:对于我正在做的事情,我只想继续影响嵌套循环
b = ["hello"] * 5
d = ["world"] * 10
for a in b: # Outer Loop
x = 1 + 1
for c in d: # Nested Loop
if c:
x += 1
else:
continue # Does this affect the Nested Loop or the Outer Loop
Run Code Online (Sandbox Code Playgroud)