Pass Statement in Python
In python , pass statement is a null statement. Interpreter does not ignores pass statement eventually it does not do anything about pass statement.
Pass statement used to delay the time of compilation or when we do not know what code to write. In any function of a parent class which is useless to that class , but it is an useful function to it’s child classes to avoid any error in base class then we just use pass statement.
- If there is an empty body of function or class we can use pass statement.
def PrepInsta( ) :
class prepInsta :
- Pass statement in function and class.
- Pass statement in loop and decision making.
Not passed for 5
Not passed for 6
Not passed for 7
Not passed for 8
Not passed for 9
Not passed for 11