Can we use pass statement in a Python if clause?


In Python, pass keyword is a dummy statement. It is used where a statement is necessary to fulfill syntax requirement but the actual implementation of processing logic is yet to be finalized. It can be used in if as well as else block

if expr==True:
   pass
else:
   pass

Updated on: 18-Jun-2020

81 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements