#Python has several Easter eggs built in! ππ₯π£π
An Easter egg is a fun little surprise in a programming language, video game or movie.
Let's talk about some of Python's cool Easter eggs!
π§΅ππ
π₯1οΈβ£ - The most famous #Python Easter egg is probably The Zen of Python, which you will see if you "import this"
π₯2οΈβ£ - What you might not know is that Zen of Python's source is really interesting too:
github.com/python/cpythonβ¦
π₯3οΈβ£ - The next most well-known Easter egg in #Python is probably "import antigravity"
If you type that in your Python REPL, you will be taken to this XKCD comic: xkcd.com/353/
π₯4οΈβ£ - Create "Hello World" with an import in #Python!
π₯5οΈβ£ - Let's try and import braces in #Python!
Nope! That Easter Egg won't let us!
π₯6οΈβ£ - This Easter Egg is kind of tricky. It's for the math nerds in #Python
If you hash infinity in Python, you get back a representation of Pi
If you hash NAN, you will get zero
π₯7οΈβ£ - Barry Warsaw, a longtime #Python core developer, was nominated "Friendly Language Uncle For Life" or FLUFL
If you do this special import, the inequality operator "!=" is replaced with "<>"
There are a few other Easter eggs mentioned in this curated list of Easter Eggs in Python on GitHub:
github.com/OrkoHunter/pytβ¦
Thanks for reading my fun little thread on #Python Easter eggs! πππ₯
Follow me for more neat content on the Python language!
Share this Scrolly Tale with your friends.
A Scrolly Tale is a new way to read Twitter threads with a more visually immersive experience.
Discover more beautiful Scrolly Tales like this.
