Zen of Python

The Zen of Python is a collection of 20 software principles that influences the design of the Python Programming Language. Only 19 of which were written in August 2004 by Tim Peters. The principle text is released into the public domain.

You use the below command to get Zen of Python from your Python Shell,

import this

Principles are listed as follows:

Beautiful is better than ugly.

Explicit is better than implicit.

Simple is better than complex.

The complex is better than the complicated one.

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!

So, are you ready to enter the den with the Zen of Python!

Type yes! in the comment below to get started with Python programming. An IIT-M Certified Python programming can add multiple stars to your collar!

Get started here:


Contact Form

By clicking 'Submit' you Agree to Guvi Terms & Conditions.

Our Learners Work at

Our Popular Course

Share this post

Author Bio


Our Live Classes

Learn Javascript, HTML, CSS, Java, Data Structure, MongoDB & more
Learn Python, Machine Learning, NLP, Tableau, PowerBI & more
Learn Selenium, Python, Java, Jenkins, Jmeter, API Testing & more
Learn Networking, Security Testing, IAM, Access Management & more

Hey wait, Don’t miss New Updates from GUVI!

Get Your Course Now

Related Articles