this Module¶
The this module displays the Zen of Python, a philosophy guide for Python programming by Tim Peters.
Complexity Reference¶
| Operation | Time | Space | Notes |
|---|---|---|---|
| Import module | O(1) | O(1) | Decodes and prints Zen text |
The Zen of Python¶
Viewing the Zen¶
import this
# Prints:
# 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.
# Readability counts.
# ...
The Zen offers guidance for Pythonic code:
- Use simple, clear approaches
- Readability matters
- Practicality beats purity
- Errors should never pass silently
- Flat is better than nested
- Sparse is better than dense