In Python programming, the pass statement is a null statement. The difference between a comment and a pass statement in Python is that while the interpreter ignores a comment entirely, pass is not ignored. However, nothing happens when the pass is executed. It results in no operation (NOP).
Python pass Syntax:
pass
Python pass example:
1. If the number is even we are doing nothing and if it is odd then we are displaying the number.
for num in [2,1,8,56,90,1,101,23]: if num%2 == 0: pass else: print(num)