当使用嵌套的for循环时,如果我在内部嵌套的for循环中使用continue,那么该continue的作用范围仅适用于内部循环,还是会继续外部循环?
注意:对于我正在处理的内容,我只希望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