python pass statement

The pass statement in python does nothing it is used when a statement required syntactically but the program requires no action. The most use of pass statement is scenario where you design a new class with some method that you do not want to implement. Python language has syntactical requirement that code like except, class cannot be empty. Pass statement is needed for block not to produce Indentation error.
When condition is triggered the pass statement allows you to handle condition without loop impact in any way. Comparing with the other statements the pass statement will be within the block of code under loop statement after the conditional if statement.
Syntax:-

         Pass

Example:-

defmyMethod():
pass
print(‘hello’)

O/p:-
        hello

Additional Services : Refurbished Laptops Sales, Python Classes, Share Market Classes And SEO Freelancer in Pune, India