The Zen of Python

So you have successfully installed python on your Mac, windows, android or ios device. Before you begin coding, here’s a simple hidden command to remind yourself of the philosophy behind python.

At the python prompt type the following
>>import this

Try it. This will produce the following text. This is part of all standard python. Yesterday installed python on my wife’s android device and tried this and here’s the partial output.

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.

Type and read the full text. Do you know any other hidden feature or command in python, do let me know in the comments!

2 thoughts on “The Zen of Python

  1. >>> from __future__ import braces
    File “”, line 1
    SyntaxError: not a chance

    >>>import __hello__
    Hello world…

    Those are the only other two I remember. They still work, at least in Python 2.7.*

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s