Open In App
Related Articles

Python Continue Statement

Improve
Improve
Improve
Like Article
Like
Save Article
Save
Report issue
Report

Python Continue Statement skips the execution of the program block after the continue statement and forces the control to start the next iteration.

Python Continue Statement

Python Continue statement is a loop control statement that forces to execute the next iteration of the loop while skipping the rest of the code inside the loop for the current iteration only, i.e. when the continue statement is executed in the loop, the code inside the loop following the continue statement will be skipped for the current iteration and the next iteration of the loop will begin.

Python continue Statement Syntax

while True:
    ...
    if x == 10:
        continue
    print(x)

Flowchart of Continue Statement

Python Continue Statement

flowchart of Python continue statement

Continue statement in Python Examples

Demonstration of Continue statement in Python

In this example, we will use continue inside some condition within a loop.

Python3




for var in "Geeksforgeeks"