Python Continue For Loop
The continue Statement
With the continue statement we can stop the current iteration of the loop, and continue with the next:
Example
Do not print banana:
fruits = ["apple", "banana", "cherry"]
for x in fruits:
if x == "banana":
continue
print(x)
Try it Yourself »
for x in fruits:
if x == "banana":
continue
print(x)
Related Pages
Python For Loops Tutorial For Loop Through a String For Break Looping Through a Range For Else Nested Loops For pass