Python Tutorials
- Python
- How to install Python?
- PIP
- How to Run Python Program
- Python Identifiers,Statement, Indentation and Comments
- Variable
- Data type
- Decision Making
- Python Loops
- Break,Continue, Pass
- Functions
- Predefine Functions
- Lambda Functions
- Variable Scope
- List
- Tuple
- Python Sets
- Python Dictionary
- Python String
- String Formating
- Input/Output
- File Handling (Input / Output)
- Iterators
- Python Modules
- Python Date
- Python JSON
- Classes and Objects
- Constructor
- Polymorphism
- Encapsulation
- inheritance
- Class or Static Variables in Python
- class method vs static method
- Abstraction
- Exception Handling
- MySql Python
- MySql Create Database
- MySql CRUD
- Django
What is Break, Continue, Pass?
Break
File name : index.py
Continue
File name : index.py
Pass
the pass keyword is used to execute nothing; it means, when we don't want to execute code, the pass can be used to execute empty. It is the 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.
File name : index.php
values = {'P', 'y', 't', 'h','o','n'}
for val in values:
pass
File name : index.py
for i in [1,2,3,4,5]:
if(i==4):
pass
print("This is pass block",i)
print(i)
Output :-
1
2
3
This is pass block 4
4
5
2
3
This is pass block 4
4
5
File name : index.py
File name : index.py
File name : index.py