Empty blocks (pass command)

The pass statement basically does nothing. It is used when syntactically a statement is needed, but the program, function or loop should do nothing.

Code Example

number = 17

if (number < 100):
    pass
else:
    print("Value is greater than or equal to 100")
Code Explanation

The code defines a variable number with the value of 17. It then uses an if statement to check if the value of number is less than 100. If it is, the pass statement is executed which does nothing and moves on to the next line. If the value of number is not less than 100, the else clause is executed, printing the message “Value is greater than or equal to 100”.