Python pass statement (Python 3 )

Python pass statement

Python has a special keyword called pass. The Python pass keyword tells Python to do nothing at all. In other words: just pass this line of code and continue. If you are used to programming in C-like languages, you probably never needed such a statement.

Here's an example of how to use Python's pass statement in a stub function. I also threw in a little extra for bonus points: using pass to ignore an exception.

To read more about pass, head over to my article on Python's pass statement in the Python tutorial.

Edit and run this Python 3 example code

This code is editable and runnable. You can run "Python pass statement" by pressing the run button. It will be executed in our backend and the result (stdout and stderr) is displayed in addition tabs.

Share "Python pass statement"

Share this crumb (Python pass statement) with your friends and colleagues to help them learn more about Python 3 programming.

Twitter, Facebook, LinkedIn

On Twitter, Facebook, and LinkedIn, simply paste the URL in your post and watch the magic unfold.

IFRAME

If you want to embed the crumb in an iframe, use the following code:

oEmbed (WordPress)

We support oEmbed, but most sites use allowlisting. On WordPress, oEmbed is supported out of the box, but see the note below.

If you plan to use crumb.sh heavily on Wordpress, you can use the following PHP code to allowlist our site and unlock all the functionalities of our crumbs:
wp_oembed_add_provider( 'https://crumb.sh/*', 'https://crumb.sh/oembed/' );

Embed.ly

Embed.ly is a service that allows you to embed content from other sites. We will request to be added to the list of trusted sites once we're out of beta.