Get startedGet started for free

Zen of Python

In the video, we covered the Zen of Python written by Tim Peters, which lists 19 idioms that serve as guiding principles for any Pythonista. Python has hundreds of Python Enhancement Proposals, commonly referred to as PEPs. The Zen of Python is one of these PEPs and is documented as PEP20.

One little Easter Egg in Python is the ability to print the Zen of Python using the command import this. Let's take a look at one of the idioms listed in these guiding principles.

Type and run the command import this within your IPython console and answer the following question:


What is the 7th idiom of the Zen of Python?

This exercise is part of the course

Writing Efficient Python Code

View Course

Hands-on interactive exercise

Turn theory into action with one of our interactive exercises

Start Exercise