Python break and continue statements

The break and continue statements are called Decision-Making Statements in Python. Let us understand them one by one:

break statement in Python

In the break statement, the current loop is terminated and the execution of the program is aborted. After termination, the control reaches the next line after the loop.

Syntax

Example – break statement

The output is as follows:

continue statement in Python

The continue statement in Python transfers control to the conditional expression and jumps to the next iteration of the loop.

Syntax

Example – continue statement

The output is as follows:

If you liked the tutorial, spread the word and share the link and our website Studyopedia with others.


For Videos, Join Our YouTube Channel: Join Now


Read More:

Python Comments
Python Modules
Studyopedia Editorial Staff
contact@studyopedia.com

We work to create programming tutorials for all.

No Comments

Post A Comment

Discover more from Studyopedia

Subscribe now to keep reading and get access to the full archive.

Continue reading