Here's a simple example:

for letter in 'Django':    
    if letter == 'D':
        continue
    print("Current Letter: " + letter)

Output will be:

Current Letter: j
Current Letter: a
Current Letter: n
Current Letter: g
Current Letter: o

It skips the rest of the current iteration (here: print) and continues to the next iteration of the loop.

Answer from Snehal Parmar on Stack Overflow
🌐
GeeksforGeeks
geeksforgeeks.org › python › python-continue-statement
Python Continue Statement - GeeksforGeeks
Explanation: Whenever char == 'e', the continue statement executes, skipping the print function for that iteration. Example 2. Using continue in nested loops
Published   July 12, 2025
People also ask

How does the continue statement work in Python?
When a program encounters a Python continue statement in code, it skips the current iteration and moves on to the next one. This is useful when we want to exclude certain iterations depending on given conditions.
🌐
wscubetech.com
wscubetech.com › resources › python › continue-statement
Continue Statement in Python: Syntax, Uses, Examples
Why do we need the continue statement in Python?
The continue statement in Python skips the rest of the statements in the current iteration of the loop and gives control to the top of the loop. Basically, it returns control to the beginning of the loop. We use the continue statement with the while and for loops.
🌐
wscubetech.com
wscubetech.com › resources › python › continue-statement
Continue Statement in Python: Syntax, Uses, Examples
What is the use of continue in Python?
If we want to skip part of a loop based on a condition but continue running the rest of the loop, the continue statement helps us do that without stopping the loop entirely.
🌐
wscubetech.com
wscubetech.com › resources › python › continue-statement
Continue Statement in Python: Syntax, Uses, Examples
🌐
Tutorialspoint
tutorialspoint.com › python › python_continue_statement.htm
Python - Continue Statement
for letter in 'Python': if letter == 'h': continue print ('Current Letter :', letter) print ("Good bye!") When the above code is executed, it produces the following output − · Current Letter : P Current Letter : y Current Letter : t Current ...
🌐
W3Schools
w3schools.com › python › ref_keyword_continue.asp
Python continue Keyword
Python Examples Python Compiler Python Exercises Python Quiz Python Challenges Python Server Python Syllabus Python Study Plan Python Interview Q&A Python Bootcamp Python Certificate Python Training ... The continue keyword is used to end the current iteration in a for loop (or a while loop), and continues to the next iteration.
🌐
Programiz
programiz.com › python-programming › break-continue
Python break and continue (With Examples)
For example, i = 0 while i < 5: if i == 3: break print(i) i += 1 ... The continue statement skips the current iteration of the loop and the control flow of the program goes to the next iteration. ... We can use the continue statement with the for loop to skip the current iteration of the loop ...
🌐
WsCube Tech
wscubetech.com › resources › python › continue-statement
Continue Statement in Python: Syntax, Uses, Examples
October 1, 2025 - Learn about the Python continue statement, its features, benefits, use cases, and examples. Enhance your code efficiency in this tutorial.
🌐
Built In
builtin.com › software-engineering-perspectives › pass-vs-continue-python
Pass vs. Continue in Python Explained | Built In
More on Python: 3 Ways to Write Pythonic Conditional Statements · The continue statement is used to skip the remaining code inside a loop for the current iteration only. For instance, let’s use continue instead of a break statement in the previous example.
Find elsewhere
🌐
Reddit
reddit.com › r/learnpython › when should i use the 'continue' keyword?
r/learnpython on Reddit: When should I use the 'continue' keyword?
January 2, 2024 -

So, I tried searching the group and I found people asking *what* the continue keyword does, which is not my question. I think I understand it. Basically, it just says "hey, if x condition is met do not do what you did to every other element in the loop. Potentially do this instead or Just go to the next item."

The question I have is why should I use it instead of just an if-esle statement,, or if you prefer continue why should I use an if-else and not default to continue.

To put it into context, what is the meaningful difference between the following code blocks:

for i in range(10):
if i == 7:
    print('7? I hate prime numbers bigger than 5!')
    continue
print(f'Woo! I love the number {i}')

and

for i in range(10):
if i == 7:
    print('7? I hate prime numbers bigger than 5!')
else:
    print(f'Woo! I love the number {i}')

Both got me the same result. Is it just a "Python has many ways to do the same thing" deal or am I missing a crucial difference?

🌐
Real Python
realpython.com › python-continue
Skip Ahead in Loops With Python's continue Keyword – Real Python
March 27, 2025 - Test your understanding of Python's continue keyword, which allows you to skip code in a loop for the current iteration and jump immediately to the next one. Loops are control flow statements used to perform operations repeatedly a certain number of times.
🌐
Boot.dev
boot.dev › lessons › 3f2e485c-fcc2-419c-8664-f4b6318b4c7f
Learn to Code in Python: Continue Statement | Boot.dev
A continue statement immediately halts the current iteration and jumps to the next one, which saves the program from doing unnecessary work. For example, if we're calculating square roots, we might want to skip negative numbers.
🌐
Geekster
geekster.in › home › python continue statements
Python Continue Statements (with Example)
April 15, 2024 - Suppose you’re writing a program to print all the even numbers in a list: numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] for number in numbers: if number % 2 != 0: # If the number is not even continue # Skip this number and continue to the next ...
🌐
Unstop
unstop.com › home › blog › continue statement in python | working explained with examples
Continue Statement In Python | Working Explained With Examples
February 4, 2025 - Classes In Python | Objects, Creation, Working, & More (+Examples) ... Instance Attributes vs. Class Attributes In Python Classes · Object-Oriented Programming (OOP) Concepts In Python ... Arbitrary Arguments Vs. Keyword Arguments ... The continue statement in Python is used in loops to skip the current iteration and move to the next one.
🌐
Python Tutorial
pythontutorial.net › home › python basics › python continue
Using Python continue Statement to Control the Loops
March 26, 2025 - for index in range(10): if index % 2: continue print(index)Code language: Python (python) ... How it works. First, iterate over a range of numbers from 0 to 9 using a for loop with the range() function. Second, if the index is an odd number, skip the current iteration and start a new one.
🌐
Tutorialspoint
tutorialspoint.com › python › python_loop_control.htm
Python Break, Continue and Pass Statements
The continue statement can be used in both while and for loops. for letter in 'Python': # First Example if letter == 'h': continue print ('Current Letter :', letter) var = 10 # Second Example while var > 0: var = var -1 if var == 5: continue ...
🌐
Python Examples
pythonexamples.org › python-continue
Python continue
... In this example, we shall continue the execution of for loop when the element is divisible by 3. for x in range(1, 11) : if x%3 == 0 : continue print(x) ... In this example, we shall iterate over list using for loop. When we get an element of 9, we shall continue with next elements. myList ...
🌐
Educative
educative.io › answers › what-is-the-continue-statement-in-python
What is the continue statement in Python?
Line 1: We start a for loop and give an expression that makes the variable letter represent all the characters of the string Python. Line 2: We create a condition that if the letter is equal to 'o' in any of the iterations, the current iteration ...
🌐
W3Schools
w3schools.com › python › gloss_python_while_continue.asp
Python While Continue
Python Examples Python Compiler Python Exercises Python Quiz Python Challenges Python Server Python Syllabus Python Study Plan Python Interview Q&A Python Bootcamp Python Certificate Python Training · ❮ Python Glossary · With the continue statement we can stop the current iteration, and continue with the next: Continue to the next iteration if i is 3: i = 0 while i < 6: i += 1 if i == 3: continue print(i) Try it Yourself » ·