What is pass in python?
Pass is keyword which is a used to write a null statement. It does not return anything when executed. It helps us to write the loops, functions, classes, etc without any value in it to use it later. It minimizes the compilation error.
a=5 for i in range(a): pass
Let us see another example of class with pass statement.
class helloworld: pass
This is all about pass statement in python.
Please login to comment
View all comments