Nicolas Pirson

how to learn without PEP 20

Just a Python tutorial (voluntary ugly) while disrespecting the Zen of Python

I felt like writing another Python joke.

Here's a tutorial to make print("Hello, World!") ridiculously more complicated than it should be.

Every Python developer knows this one:

import this

And every Python developer knows what it prints:
The Zen of Python.

But this is so basic, so let's commit a small heresy.

Forgive me for this heresy.
O Python, my liege!

import this
print(this.s)

This displays the encoded version of The Zen of Python. WOW!
One of the most famous Easter eggs in programming.
Beautiful is better than ugly.

And what is the name of this file?
hello_world_pep20_violation.py of course! 😄

Here, I wanted to write something intentionally complex, intentionally ugly, but still useful — a small tutorial to help people understand a few important Python concepts.

What's the menu in this tutorial restaurant?

  • Classes
  • Threads
  • try
  • except
  • finally
  • f-strings
  • \t
  • \n

Just to make print() more complex, less readable — an ode to Tim Peters’ Zen of Python.

Scroll to Top