Frequently Asked Questions

What is pass in Python?

The pass is used to fill up the empty blocks of code which need to be executed during runtime but don’t have any code written yet.

For example, let there be a function func() whose functionality is yet not decided.

## If we leave func() empty and call it, it will throw an error.

def func():




## pass can be used in such cases

def func():

pass represents a null operation.


Other Popular Questions