pass statement in python
pass statement does nothing.
Wow, that’s a bummer!
Hmmm… Then, why do we need it?
Well, it can be used when a statement is required syntactically but the program requires no action.
This is also commonly used for creating empty classes so that we can come back later and code something:
pass statement can be used is inside a function:
- The body of any statement containing
passstatements are ignored by the python interpreter, just like it ignores comments.