Learn Python Programming

The pass Statement


The pass Statement does not do anything. pass Statement is used a placeholder for future code. It avoid getting any error, when empty code is not allowed.

Let us understand with the help of an example below:

a = 25
b = 80

if b > a:
	pass

Here, if we are using pass statement inside the black if statement, would throw an error. However it can be avoided by using pass statement.