The Nerdy Sixty | (24/60) Zen of Python | Solution

Python hides a collection of guiding principles. How do you display the Zen of Python?

Hint 1: In a Python interpreter, try importing something called “this”.

Hint 2: `import this` in Python will unveil a list of aphorisms.

 

Solution:

In a Python REPL, type `import this`. This prints β€œThe Zen of Python,” a poem of programming principles (e.g., “Beautiful is better than ugly…”). It’s a built-in Easter egg.

 

 


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

WordPress Cookie Notice by Real Cookie Banner