Tutorialspoint

Can we use pass statement in a Python if clause?

Can we use pass statement in a Python if clause?                                     


1 Answer
Malhar Lathkar
, 0 Views

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
Advertisements