Python Pass Statement

The pass statement does not do anything. It is used with 'if' statement or inside a loop to represent no operation. We use pass statement when we need a statement syntactically but we do not want to do any operation.

The syntax of pass statement is given below:

looping structure
  if(particular itraticve value)

Sample program:A program to know that pass does nothing

x = 0
while x<10: 
   if x>5: 
   print ('x=', x) 
print("Out of loop")