Lesson - 15 : Python3 - Python Flow Controls : break, continue, pass

Publié le: 13 décembre 2017
sur la chaîne: Sada Learning Hub
52
2

**************************************************
Python Core PlayList :    • Lesson - 01 : Python3 - What is python  
Python Advanced PlayList :    • Lesson - 46 : Python Advanced - Pytho...  
**************************************************
Python Flow Controls : break, continue, pass:
A loop statement allows us to execute a statement or group of statements multiple times. 
For loops can iterate over a sequence of numbers using the "range" and "xrange" functions.

break : break statement is a jump statement that is used to pass the control to the end of the loop.
When break statement is applied the control points to the line following the body of the loop , hence applying break statement makes the loop to terminate and controls goes to next line pointing after loop body.

continue : continue Statement is a jump statement that is used to skip the present iteration and forces next iteration of loop to take place. It can be used in while as well as for loop statements.
The continue statement in Python returns the control to the beginning of the while loop. The continuestatement rejects all the remaining statements in the current iteration of the loop and moves the control back to the top of the loop.

pass : When you do not want any code to execute, pass Statement is used. It is same as the name refers to. It just makes the control to pass by without executing any code. If we want to bypass any code pass statement can be used.
The pass statement is a null operation; nothing happens when it executes. The pass is also useful in places where your code will eventually go, but has not been written yet 

Sample Projects : https://github.com/SadaLearningHub1/P...


Sur cette page du site, vous pouvez voir la vidéo en ligne Lesson - 15 : Python3 - Python Flow Controls : break, continue, pass durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Sada Learning Hub 13 décembre 2017, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 52 fois et il a aimé 2 téléspectateurs. Bon visionnage!