.Net, Advance Java coaching, angular JS, Basic computer course, C Language, C programming language, c++ language, computer class in satellite-ahmedabad, computer coaching in Ahmedabad, computer engineering coaching in Ahmedabad, Education, Engineering Courses, Java Course, Java Course In Satellite - Bopal Ahmedabad, learn Programming Languages at TCCI, Online coaching for Java, online computer coaching, PHP coaching, programming language, Python, TCCI computer coaching

What is use of pass statement in Python?-tccicomputercoaching.com

The pass statement. pass_stmt: “pass“. pass is a null operation — when it is executed,
nothing happens.Use the pass statement to indicate empty functions , classes and loops. With pass, we indicate a “null” block. Pass can be placed on the same line, or on a separate line. Pass can be used to quickly add things that are unimplemented.

pass-statement-Python

Example:

str=”Hello”

for i in str:

if i==’H’:

pass

print(“pass is executed:”)

else:

print(i)

Output:

pass is executed

e

l

l

o

To learn more about Python at TCCI.

Call us @ 9825618292

Visit us @ http://www.tccicomputercoaching.com

 

 

Leave a comment