pass Statement
Python pass statement is a null statement: nothing happens when it is executed.
When executing code that contains a pass statement, the Python interpreter treats the pass statement as a single statement. As a result, it does not issue a syntax error.
pass statement with if statement
The pass statement can be used in if statement:
if condition:
passpass statement with for and while loop
The pass statement can be used in for loops:
for i in range(1,100):
passand in while loops:
while condition:
passpass statement with functions and classes
The pass statement can be used in functions:
def foo():
passand in classes:
class BarClass:
pass