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
🌐
W3Schools
w3schools.com › python › ref_keyword_continue.asp
Python continue Keyword
Python Examples Python Compiler ... 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....
🌐
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 ...
🌐
GeeksforGeeks
geeksforgeeks.org › python › python-continue-statement
Python Continue Statement - GeeksforGeeks
The continue statement in Python is a loop control statement that skips the rest of the code inside the loop for the current iteration and moves to the next iteration immediately.
Published   3 weeks ago
🌐
Python documentation
docs.python.org › 3 › tutorial › controlflow.html
4. More Control Flow Tools — Python 3.14.3 documentation
>>> for num in range(2, 10): ... if num % 2 == 0: ... print(f"Found an even number {num}") ... continue ... print(f"Found an odd number {num}") ...
🌐
Tutorialspoint
tutorialspoint.com › python › python_continue_statement.htm
Python - Continue Statement
Python continue statement is used to skip the execution of the program block and returns the control to the beginning of the current loop to start the next iteration. When encountered, the loop starts next iteration without executing the remaining
🌐
DigitalOcean
digitalocean.com › community › tutorials › how-to-use-break-continue-and-pass-statements-when-working-with-loops-in-python-3
How to Break Out of Multiple Loops in Python | DigitalOcean
August 7, 2025 - The continue statement causes a program to skip certain factors that come up within a loop but then continue through the rest of the loop. When an external condition is triggered, the pass statement allows you to satisfy Python’s syntactical requirement for a code block without performing ...
Find elsewhere
🌐
Programiz
programiz.com › python-programming › break-continue
Python break and continue (With Examples)
# Program to print odd numbers from 1 to 10 num = 0 while num < 10: num += 1 if (num % 2) == 0: continue print(num) ... In the above example, we have used the while loop to print the odd numbers between 1 and 10. Here, ... Before we wrap up, let’s put your knowledge of Python break and continue to the test!
🌐
Real Python
realpython.com › python-continue
Skip Ahead in Loops With Python's continue Keyword – Real Python
March 27, 2025 - If it’s odd, then you execute continue. If it’s even, then you square the number and print that value. This results in the same output as when you ran the for loop earlier: ... In both loops, when Python executes the continue statement, it skips the rest of the current iteration.
🌐
Unstop
unstop.com › home › blog › continue statement in python | working explained with examples
Continue Statement In Python | Working Explained With Examples
February 4, 2025 - The continue statement in Python programming is used inside loops to skip the current iteration and proceed directly to the next iteration of the loop. When the continue statement is encountered, the remaining code in that iteration is ignored, ...
🌐
W3Schools
w3schools.com › python › gloss_python_while_continue.asp
Python While Continue
❮ 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 » · Python While ...
🌐
freeCodeCamp
freecodecamp.org › news › python-break-and-python-continue-how-to-skip-to-the-next-function
Python Break and Python Continue – How to Skip to the Next Function
March 14, 2022 - You can use the continue statement if you need to skip the current iteration of a for or while loop and move onto the next iteration.
🌐
Built In
builtin.com › software-engineering-perspectives › pass-vs-continue-python
Pass vs. Continue in Python Explained | Built In
Pass and continue are two statements in Python that alter the flow of a loop. Pass signals that there’s no code to execute, while continue forces the loop to skip the remaining code and start a new statement. Here’s what you need to know.
🌐
Reddit
reddit.com › r/learnpython › when should i use the 'continue' keyword?
r/learnpython on Reddit: When should I use the 'continue' keyword?
April 26, 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?

🌐
W3Schools
w3schools.com › python › gloss_python_for_continue.asp
Python Continue For Loop
fruits = ["apple", "banana", "cherry"] for x in fruits: if x == "banana": continue print(x) Try it Yourself » · Python For Loops Tutorial For Loop Through a String For Break Looping Through a Range For Else Nested Loops For pass
🌐
Real Python
realpython.com › ref › keywords › continue
continue | Python Keywords – Real Python
In Python, the continue keyword within loops lets you skip the rest of the code inside the loop for the current iteration and jump to the next iteration. When you use continue, the loop doesn’t terminate.
🌐
Python Tutorial
pythontutorial.net › home › python basics › python continue
Using Python continue Statement to Control the Loops
March 26, 2025 - Use the Python continue statement to skip the current iteration and start the next one.
🌐
LearnDataSci
learndatasci.com › solutions › python-continue
Python Continue - Controlling for and while Loops – LearnDataSci
As mentioned previously, continue is used to skip to the end of the current iteration of a loop. Therefore, Python will only bypass code in situations that trigger continue. For a more complex example, let's say we'd like to iterate through a list of numbers and find the square root of each ...
🌐
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.
🌐
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.