image
image
image

pass Statement in Python

image

Like a comment, a pass statement does not impact the program as it leads to no operation.

The syntax of pass

pass

Think of a program code that you plan to use in future but is not currently needed. Instead of having to insert that code in future, the code can be written as pass statements.

Example

Start IDLE.

Navigate to the File menu and click New Window.

Type the following:

my_list={‘k’,’i’,’n’}

for tracker in my_list:

pass