Python Pass Statement With Examples

The pass statement is used only in the Python programming language. Basically, the pass statement does nothing as it is a null statement. This statement becomes useful in a large number of codes where the programmer just wants to write the function signature and left the function body for future implementation. 

Sample Code 1:

while True:
      pass

Sample Code 2:

# pass is nothing but a placeholder for any functionality to be added later point of time.
sequence = {'q', 'r', 's', 't'}
for val in sequence:
    pass

Sample Code 3:

def function(args):
    pass   # Remember to implement this later