0 votes
in Python by (23.1k points)
What is Python Pass

1 Answer

0 votes
by (30.4k points)
In Python, pass keyword is used to execute nothing; it means, when we don't want to execute code, the pass can be used to execute empty. It is same as the name refers to. It just makes the control to pass by without executing any code. If we want to bypass any code pass statement can be used.

Python Pass Syntax


Python Pass Example

for i in [1,2,3,4,5]:  

    if i==3:  


        print "Pass when value is",i  

    print i,  



1 2 Pass when value is 3  

3 4 5  

Click here to read more about Python
Click here to read more about Insurance

Related questions

0 votes
asked Sep 9, 2022 in Python by john ganales (13.0k points)
0 votes
0 votes
asked Aug 29, 2020 in Python by Robindeniel (19.7k points)
+1 vote
asked Jan 30, 2022 in Python by sharadyadav1986 (30.4k points)