-
In python there are no brackets present for writing loops or conditional statment, instead we use indentation to represent the part inside a condition or loop.
-
It will throw an error if proper indentation is not present. or if multiple loops are there withou proper indentation a function can be outside the loop.
-
Python consist of control statements
- continue - this will return the control to the beginning of the loop
- break - this will break the loop and brings control out of the loop.
- pass - it will let the loop continue and do nothing. used mostly in exception handling or running some empty loop.
Ankit-Khule/Conditonal-Statements-Looping-Constructs-in-Python
if-else, While Loop, for loop and Nested loop of each in Python
Jupyter Notebook