Python Programming Tutorial #13- Break,Continue and Else on loop

Published: 02 April 2018
on channel: CodersArts
79
1

Break ,continue and else clause on loop
========================================
Hello Everyone,
Welcome to my course Learning of Python Programming.
In previous lesson we had talked about if else control statements.
In this lesson, we will discuss break, continue and else clause on loop.
Okay, so let’s start,
In Python, break and continue statements can alter the flow of execution of a normal loop.
Loops iterate over a block of code until test expression is false, but sometimes we wish to terminate the current iteration or even the whole loop without checking test expression.
The break and continue statements are used in these cases.


Let’s take a look and see how break and continue looks like
First Break:
The break statement, like others programming language do the same work in python, It breaks out of the innermost enclosing for or while loop.

=================================
website: www.codersarts.com
facebook:   / codersarts2017  
twitter:  / @codersarts