“The Zen of Python” Easter Egg

简介: “The Zen of Python” Easter Egg

Python Tricks: “The Zen of Python” Easter Egg
But there’s really no way around Tim Peters’ Zen of python. I guess that everyone who like to learn Python language must have benefited from revisiting it over the years, and I think Tim’s words made every programmer a better coder. Hopefully they can do the same for you.

Also, you can tell the Zen of Python

>>> 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!

相关文章
|
1天前
|
iOS开发 MacOS Python
Python 编程案例:谁没交论文?输出并生成电子表格
Python 编程案例:谁没交论文?输出并生成电子表格
16 9
|
1天前
|
IDE 开发工具 iOS开发
Python编程案例:查找指定文件大小的文件并输出路径
Python编程案例:查找指定文件大小的文件并输出路径
10 3
|
1天前
|
文件存储 iOS开发 MacOS
Python编程案例:文件查找并归类
Python编程案例:文件查找并归类
|
1天前
|
Python
Python编程案例:同一工作簿不同表单特定数据添加到工作簿的另一表单里
Python编程案例:同一工作簿不同表单特定数据添加到工作簿的另一表单里
|
1天前
|
iOS开发 MacOS Python
Python编程案例:根据姓名归档论文、报告
Python编程案例:根据姓名归档论文、报告
|
1天前
|
数据处理 Python
Python编程-利用datetime模块生成当前年份之前指定的间隔所有年份的日期列表和csv文件
Python编程-利用datetime模块生成当前年份之前指定的间隔所有年份的日期列表和csv文件
|
1天前
|
Python
Python编程获取当前日期的所属周日期信息
Python编程获取当前日期的所属周日期信息
10 1
|
1天前
|
IDE 开发工具 数据安全/隐私保护
Python编程实现批量md5加密pdf文件
Python编程实现批量md5加密pdf文件
|
1天前
|
安全 网络安全 数据安全/隐私保护
Python渗透测试之流量分析:流量嗅探工具编程
Python渗透测试之流量分析:流量嗅探工具编程
10 0
|
1天前
|
IDE 搜索推荐 网络安全
Python编程:编写被动信息搜集之网址的IP及Whois查询
Python编程:编写被动信息搜集之网址的IP及Whois查询