1.

Explain the usage of keyword ‘pass’ in class definition.

Answer»

When a class doesn’t define any methods or attributes, but syntactically, there needs to be something in the definition, so we use the pass. It is a statement that does nothing and is a good placeholder when you are stubbing out functions or classes.



Discussion

No Comment Found