Python Pass Statement



pass is no-operation Python statement. It indicates nothing is to be done. It is just a place holder used in compund statements as they cannot be left blank.
Example of using pass statement in Python:
>>> if x==0:
...     pass
... else:
...     print "x!=0"

No comments:

Post a Comment