Get The Most Affordable Hosting in the World!

Starting at just $1.87/month, Vercaa offers unbeatable pricing for world-class web hosting services.

Fast, reliable, and secure hosting to power your website without breaking the bank. Plus, enjoy a free CDN for faster loading times worldwide!

Get Started Now!

The pass statement is used when a statement is required syntactically but you do not want any command or code to execute.

The pass statement is a null operation; nothing happens when it executes. The pass statement is also useful in places where your code will eventually go, but has not been written yet, i.e., in stubs).

Syntax

pass

Example

The following code shows how you can use the pass statement in Python −

 
for letter in 'Python': if letter == 'h': pass print ('This is pass block') print ('Current Letter :', letter) print ("Good bye!")

When the above code is executed, it produces the following output −

Current Letter : P
Current Letter : y
Current Letter : t
This is pass block
Current Letter : h
Current Letter : o
Current Letter : n
Good bye!




The End! should you have any inquiries, we encourage you to reach out to the Vercaa Support Center without hesitation.
Bu cevap yeterince yardımcı oldu mu? 1 Bu dökümanı faydalı bulan kullanıcılar: (1 Oy)