Python – Pass:

Pass statement is used when there is a situation where a statement is required for syntax in the code, but which should not to be executed. So that, When the program executes that portion of code will not be executed.

In the below example, we can observe that the pass statement in if condition was not executed.

Example:

Below is the Output:

In the below example, we can observe that the pass statement is not mentioned. Hence resulted an error.

Example: