The Easter Egg
Run import this in any Python interpreter and you get 19 aphorisms written by Tim Peters in 1999, baked into the language as an Easter egg:
Python 3.14.5 (tags/v3.14.5:5607950, May 10 2026, 10:43:50)
Type "help", "copyright", "credits" or "license" for more information.
>>> import this
The Zen of Python, by Tim Peters
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!
Behind the Poem
The poem predates PEP 20; it circulated on the comp.lang.python mailing list years before Guido van Rossum formalized it. The source for the this module is itself a wink: the poem is stored as a ROT-13-encoded string and decoded at import time.
Worth Slowing Down On
Most of the aphorisms read as obvious good advice until you try to apply them to a real decision. A few are worth slowing down on.
Explicit is better than implicit. Python’s *args and **kwargs are useful but can make a function’s contract invisible. A function that accepts **kwargs and passes them to three different subsystems is technically valid Python and also a trap for anyone reading the call site.
Errors should never pass silently. Unless explicitly silenced. The bare except: clause is the canonical violation. It swallows KeyboardInterrupt, SystemExit, and every bug you haven’t written yet. except SomeSpecificError: pass is a deliberate choice. The silence is the problem; the intent is not.
There should be one obvious way to do it. This is what most distinguishes Python’s philosophy from Perl’s “there’s more than one way to do it.” It’s not a promise Python keeps perfectly (string formatting alone gives you %, .format(), and f-strings), but it’s a stated goal.
If the implementation is hard to explain, it’s a bad idea. If you can’t describe what your code does to a colleague in a sentence or two, that’s worth taking seriously, not always a reason to rewrite, but always a reason to look again.
Built-in Tensions
Several aphorisms are written in deliberate tension with each other, and that’s the point. Simple is better than complex. Complex is better than complicated. Simplicity is preferred, but not at the cost of a tangled mess pretending to be simple. Now is better than never. Although never is often better than right now. The pair resists being flattened into a single rule because the right call depends on context.
The Zen is not a style guide. It’s closer to a set of priors, a disposition to bring to decisions when the right answer isn’t obvious. That it ships as an Easter egg, triggered by a nonsense import, is part of the message.