"continue" applies to loops.

It will simply stop the current iteration and jump into the next. So basically keep typing what you are typing until you type what the program expects of you.

Answer from Andrei Dragotoniu on Stack Overflow
🌐
GeeksforGeeks
geeksforgeeks.org › python › python-continue-statement
Python Continue Statement - GeeksforGeeks
Explanation: continue statement skips printing 3 and moves to the next iteration, so all numbers except 3 are printed in a single line. Example 3. Using continue with a while loop ... i = 0 while i < 10: if i == 5: i += 1 # ensure the loop variable is incremented to avoid infinite loop continue print(i) i += 1
Published   3 days ago
Discussions

if and continue vs elif
If your if statements are mutually exclusive (that is, it is impossible for more than one of the statements to be true for the same input) then using multiple if statements should yield the same results as an if/elif block. If your sequence of ifs is wrapped in a loop, and each if block ends with a continue (which, based on the title of your post, may have been the case), you should get the same results as an if/elif block (because only the first if that matches will get executed before proceeding to the next iteration of the loop). If neither of those things are true (it is possible for more than one if to be true at a time, and you don't have some other mechanic for skipping the other ifs) then there is no guarantee of getting the same output. More on reddit.com
🌐 r/learnpython
6
28
December 5, 2021
Struggling with combining while loop, if statement and try block
Hi there, I’m new to python. I just finished eric matthes crash course book and working on my first script. Its a program that calculates income tax and I’m having an issue with one of my functions which accepts user input for which year they would like to calculate tax for. More on discuss.python.org
🌐 discuss.python.org
0
0
June 25, 2024
How continue works in while loop
name = 'Jesaa29 Roy' size = len(name) i = 0 while i More on discuss.python.org
🌐 discuss.python.org
0
0
October 18, 2022
Can't understand "Continue" function in Python statement(for loop, while loop) !!
It jumps directly to the next iteration of a loop. In the code below the continue function skips the print statement below it so that "odd" is only printed on odd numbers. for i in range(10): if i%2==0: print("even") continue print("odd") More on reddit.com
🌐 r/learnpython
20
44
November 9, 2019
🌐
Manifoldapp
cuny.manifoldapp.org › read › how-to-code-in-python-3 › section › 8adf4bec-a6ca-4a11-8c8d-4cf4052d5ac4
How To Use Break, Continue, and Pass Statements when Working with Loops | How To Code in Python 3 | Manifold @CUNY
The continue statement will be within the block of code under the loop statement, usually after a conditional if statement. Using the same for loop program as in the Break Statement section above, we’ll use a continue statement rather than a break statement:
🌐
Tutorialspoint
tutorialspoint.com › python › python_continue_statement.htm
Python - Continue Statement
If the condition becomes TRUE, the continue statement will skip the current iteration and proceed with the next iteration of the loop. Let's see an example to understand how the continue statement works in for loop. for letter in 'Python': if ...
🌐
Python documentation
docs.python.org › 3 › tutorial › controlflow.html
4. More Control Flow Tools — Python 3.14.3 documentation
As well as the while statement just introduced, Python uses a few more that we will encounter in this chapter. if Statements: Perhaps the most well-known statement type is the if statement. For exa...
🌐
Sololearn
sololearn.com › en › Discuss › 2441763 › how-to-make-python-continue-after-if-statement
How to make Python continue after if statement | Sololearn: Learn to code for FREE!
August 12, 2020 - It will be faster and do the job. def uWuFy(msg): msg = msg.replace("l", "w") msg = msg.replace("r", "w") return msg msg = input() print(uWuFy(msg)) ... i used a for loop to iterate the words, then used your conditionals to change the letters on each. it may also have to do with the "elif" statement. Because you checked both words for the occurence of "l" first. each time, you check BOTH words, so that test always comes back true, meaning you will never reach the "elif" statement https://code.sololearn.com/cTTvoW9PCLJo/?ref=app
Find elsewhere
🌐
IONOS
ionos.com › digital guide › websites › web development › python break continue
How to use Python break and continue - IONOS
July 13, 2023 - Therefore, only a part of the loop is skipped if a certain ter­mi­na­tion condition is met. Python continue is also used inside the loop and is usually placed after an “if” statement.
🌐
Programiz
programiz.com › python-programming › break-continue
Python break and continue (With Examples)
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 and jump to ...
🌐
Career Karma
careerkarma.com › blog › python › python break and continue: step-by-step guide
Python Break and Continue: Step-By-Step Guide | Career Karma
December 1, 2023 - Let’s use an example to illustrate how the continue statement in Python works. In the following example, we use a continue statement to skip printing the second name in our array and then continue iterating: students = ["Paul", "Erin", "Connie", "Moira"] for student in range(0, len(students)): if student == 2: continue else: print(students[student]) print("Counter is " + str(student)) print("Program Complete")
🌐
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.
🌐
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.
🌐
Reddit
reddit.com › r/learnpython › if and continue vs elif
r/learnpython on Reddit: if and continue vs elif
December 5, 2021 -

I'm very early on in learning python, and have been going along with Jose Portilla's complete python bootcamp at Udemy.

I recently completed the statements assessment. One of the questions was to write a program that prints the integers from 1 to 100. But for multiples of three print "Fizz" instead of the number, and for the multiples of five print "Buzz". For numbers which are multiples of both three and five print "FizzBuzz".

For some reason, I completely forgot about elif, and instead completed the task with three if statements, placing a continue after each.

Can anyone help me to understand the reason as to why this method gives the same result as an if statement and two elifs?

EDIT: also, before using continue, the output would show “Fizz” for 3, then show 3 separately below, but only show “Buzz” for 5. I still don’t really understand that either.

🌐
Javatpoint
javatpoint.com › python-continue
Python continue Statement
Python Install · Python Example · Python Variables · Python Data Types · Python Keywords · Python Literals · Python Operators · Python Comments · Python If else · Python Loops · Python For Loop · Python While Loop · Python Break · Python Continue ·
🌐
GeeksforGeeks
geeksforgeeks.org › python › python-break-statement
Python break statement - GeeksforGeeks
A while loop in Python repeatedly executes a block of code as long as a specified condition is True. The break statement can be used within a while loop to exit the loop based on dynamic conditions that may not be known beforehand. ... cnt = 5 while True: print(cnt) cnt -= 1 if cnt == 0: print("Countdown finished!") break # Exit the loop
Published   July 12, 2025
🌐
Open Book Project
openbookproject.net › books › bpp4awd › ch04.html
4. Conditionals, loops and exceptions — Beginning Python Programming for Aspiring Web Developers
The name was", name + ".") else: print("\nGreat, you got it in", pos + 1, "guesses!") The flow of execution for a while statement works like this: Evaluate the condition (BOOLEAN EXPRESSION), yielding False or True. If the condition is false, exit the while statement and continue execution at the next statement.
🌐
Wikiversity
en.wikiversity.org › wiki › Python_Concepts › While_Statement
Python Concepts/While Statement - Wikiversity
April 28, 2024 - Although the if statement from the previous lesson can serve many purposes, it isn't good at being recursive. This means that the said statement cannot loop over and over again. This is where the while statement comes into play. This statement will execute its code block over and over again ...
🌐
Python.org
discuss.python.org › python help
Struggling with combining while loop, if statement and try block - Python Help - Discussions on Python.org
June 25, 2024 - Hi there, I’m new to python. I just finished eric matthes crash course book and working on my first script. Its a program that calculates income tax and I’m having an issue with one of my functions which accepts user input for which year they would like to calculate tax for.
🌐
Python.org
discuss.python.org › python help
How continue works in while loop - Python Help - Discussions on Python.org
October 18, 2022 - name = 'Jesaa29 Roy' size = len(name) i = 0 while i < size: if name[i].isspace(): continue print(name[i], end=' ') i = i + 1 #it’s supposed to print name without space “Jessa29Roy”, but the output i…