python tutorial - Python Pass - learn python - python programming
What is Python Pass?
- In Python programming, pass is a null statement.
- The difference between a comment and pass statement in Python is that, while the interpreter ignores a comment entirely, pass is not ignored.
- However, nothing happens when pass is executed. It results into no operation (NOP).
- It is used when a statement is required syntactically but you do not want any command or code to execute.
Learn Python - Python tutorial - python pass - Python examples - Python programs
- 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.
Syntax:
Example:
Explanation:
- When if condition gets true then that executes pass and print the “Pass when value is”.
Output:
Wikitechy tutorial site provides you all the learn python , python 3 online course , python scripting training , python training ,
python online course , learning with python , python programming training , learn python programming for beginners , learn python
course , free online courses for python , courses in python