Continue statement
A continue statement skips the remainder of the current loop iteration and proceeds to the loop’s next control step.
A Pythonic Adventure: From Python basics to a working web app
A continue statement skips the remaining statements in the current loop iteration and starts the next iteration.
- How it is used
- Handles canceled orders by restarting the main-menu loop for the next customer.
- How deep it goes
- Defines the iteration jump and demonstrates it inside a conditional, without exploring broader loop-control details.
- Examples
- Uses a coffee-shop main menu where customers confirm or cancel orders.
- What you can do after
- Apply continue in Python to skip canceled work and begin the next loop iteration.
Read how A Pythonic Adventure: From Python basics to a working web app explains continue statement →
Get Programming: Learn to code with Python
continue is a Python control-flow statement that skips the remaining statements in the current loop iteration and proceeds to the next iteration.
- How it is used
- Skips unwanted loop cases so the main statements run only when the required conditions hold.
- How deep it goes
- Explains iteration control and contrasts nested conditionals, but stops short of implementation internals.
- Examples
- Uses a range-based loop that filters values by thresholds, divisibility, and powers of two.
- What you can do after
- Apply it in Python loops to skip selected iterations without prematurely ending the loop.
Read how Get Programming: Learn to code with Python explains continue statement →
Python How-To
A continue statement skips the remaining body of the current loop iteration and proceeds to the next iteration when one exists.
- How it is used
- Uses continue to skip nonqualifying loop items while keeping operations for qualifying items at a shallow indentation level.
- How deep it goes
- Explains control flow, filtering alternatives, and indentation trade-offs, but does not descend into interpreter internals.
- Examples
- Demonstrates numeric iteration and urgent-task processing with multiple operations guarded by complementary conditions.
- What you can do after
- Apply it via Python for and while loops to bypass unnecessary operations for selected iterations.
Modern C
A continue statement is a C control-flow statement that skips the remainder of the current loop iteration and proceeds with the loop's next control check.
- How it is used
- Uses continue to skip an inappropriate iteration path while retaining the surrounding loop.
- How deep it goes
- Demonstrates continue operationally in a bounded for loop, but does not develop broader control-flow rules.
- Examples
- Illustrates continue while computing multiplicative inverses with the Heron approximation.
- What you can do after
- Apply it in C loop bodies to skip remaining work for selected iterations without terminating the loop.
Modern C, Third Edition
A continue statement skips the remaining body of the current loop iteration and proceeds with that loop's next iteration step.
- How it is used
- Controls loop flow by skipping the current iteration's remaining body while retaining the loop.
- How deep it goes
- Explains skipped statements and condition reevaluation through an inverse-approximation loop, without covering deeper implementation mechanics.
- Examples
- Uses an iterative multiplicative-inverse approximation that continues after values are moved to the correct side of 1.
- What you can do after
- Apply continue to skip selected loop-body work while allowing later iterations to proceed.
Read how Modern C, Third Edition explains continue statement →
Related concepts
- loopuses · A loop is a programming control-flow construct that repeatedly executes a block of instructions according to an iteration rule or continuation condition.
- keywordkind of · A keyword is a language-defined word or token with a predefined syntactic or semantic role, often restricted from use as an ordinary identifier.
- labelused by · A label is a named code location or construct that control-flow operations can reference as a target.
- code readabilityproduces · Code readability is the ease with which human readers can perceive and understand source code, including its structure and intent.
- break statementcontrasts with · A break statement terminates the nearest supported enclosing loop, switch, or similar control construct and transfers control to the following statement.
- filteringalternative to · Filtering is the operation of selecting or excluding items from data or a collection according to specified criteria.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.




