1. Beautiful is better than ugly.   # 优美好于丑陋(Python以编写优美的代码为目标)
  2. Explicit is better than implicit.   # 明确好于暗示
  3. Simple is better than complex.   # 简洁好于复杂
  4. Complex is better than complicated.   # 复杂好于凌乱
  5. Flat is better than nested.   # 扁平好于嵌套
  6. Sparse is better than dense.   # 间隔好于密集
  7. Readability counts.   # 可读性很有价值
  8. Special cases aren't special enough to break the rules.   # 特殊情况不足以打破规则
  9. Although practicality beats purity.   # 尽管实用性胜过纯粹性
  10. Errors should never pass silently.   # 错误不应该悄无声息地过去
  11. Unless explicitly silenced.   # 除非显示指定要这么做
  12. In the face of ambiguity, refuse the temptation to guess.   # 面对模棱两可,拒绝猜测的诱惑
  13. There should be one -- and preferably only one -- obvious way to do it.   # 应该有一种 -- 而且最好只有一种 -- 明确的方法来完成它
  14. Although that way may not be obvious at first unless you're Dutch.   # 虽然那种方法一开始可能并不明显,除非你是 Dutch(Python 之父)
  15. Now is better than never.   # 现在做好于永远不做
  16. Although never is often better than *right* now.   # 尽管不思考盲目动手做通常还不如不做
  17. If the implementation is hard to explain, it's a bad idea.   # 如果方案很难向人描述,那肯定是一个坏方案
  18. If the implementation is easy to explain, it may be a good idea.   # 如果方案容易向人描述,那可能一个好方案
  19. Namespaces are one honking great idea -- let's do more of those!   # 命名空间是个绝妙的主意,让我们做更多这样的事

注:在 Python 的交互式解释器中输入 import this 就可以查阅到上述文档。

The Zen of Python —— Python 之禅的更多相关文章

  1. python --- Python中的callable 函数

    python --- Python中的callable 函数 转自: http://archive.cnblogs.com/a/1798319/ Python中的callable 函数 callabl ...

  2. Micro Python - Python for microcontrollers

    Micro Python - Python for microcontrollers MicroPython

  3. 从Scratch到Python——python turtle 一种比pygame更加简洁的实现

    从Scratch到Python--python turtle 一种比pygame更加简洁的实现 现在很多学校都开设了Scratch课程,学生可以利用Scratch创作丰富的作品,然而Scratch之后 ...

  4. 从Scratch到Python——Python生成二维码

    # Python利用pyqrcode模块生成二维码 import pyqrcode import sys number = pyqrcode.create('从Scratch到Python--Pyth ...

  5. [Python]Python 使用 for 循环的小例子

    [Python]Python 使用 for 循环的小例子: In [7]: for i in range(5): ...: print "xxxx" ...: print &quo ...

  6. [python]python 遍历一个list 的小例子:

    [python]python 遍历一个list 的小例子: mlist=["aaa","bbb","ccc"]for ss in enume ...

  7. [Python]Python日期格式和字符串格式相互转换

    由字符串格式转化为日期格式的函数为: datetime.datetime.strptime() 由日期格式转化为字符串格式的函数为: datetime.datetime.strftime() # en ...

  8. [python]Python 字典(Dictionary) update()方法

    update() 函数把字典dict2的键/值对更新到dict里.如果后面的键有重复的会覆盖前面的语法dict.update(dict2) dict = {'Name': 'Zara', 'Age': ...

  9. python编程之禅

    在python界面输入 import this >>> import this The Zen of Python, by Tim Peters Beautiful is bette ...

随机推荐

  1. 【JZOJ4887】【NOIP2016提高A组集训第13场11.11】最大匹配

    题目描述 mhy12345学习了二分图匹配,二分图是一种特殊的图,其中的点可以分到两个集合中,使得相同的集合中的点两两没有连边. 图的"匹配"是指这个图的一个边集,里面的边两两不存 ...

  2. hdu4310 贪心

    考虑每次血口的要少 就按照一滴血多少伤害来计算.由于直接相除有小数.考虑x/y > a/b  =>  x*b >y*a; #include<stdio.h> #inclu ...

  3. Libevent:0异步IO简介

    一:异步IO简介 大多数的初级编程者都是从阻塞IO调用开始网络编程的.阻塞(同步)IO调用指的是:调用会一直阻塞,不会返回,直到发生下面两种情况之一.要么操作完成,要么经历相当长的时间,网络协议栈自己 ...

  4. H5页面IOS中键盘弹出导致点击错位的问题

    IOS在点击输入框弹出键盘  键盘回缩 后 定位没有相应改变  还有  textarea 也会弹出键盘 $("input").blur(function() { console.l ...

  5. @CSP模拟2019.10.16 - T3@ 垃圾分类

    目录 @description@ @solution@ @accepted code@ @details@ @description@ 为了保护环境,p6pou建设了一个垃圾分类器. 垃圾分类器是一个 ...

  6. 17-1 djanjo进阶-路由,视图,模板

    一 路由系统进阶(urls.py) 动态路由 urls.py中通过正则表达式的分组匹配,捕获用户访问的url中的值,传递给视图函数1 分组匹配(通过圆括号): 相当于给视图函数传递 位置参数 例子: ...

  7. dataframe构建

    data=[[[0],1]]df = pd.DataFrame(data, columns=['col1', 'col2']) df = pd.DataFrame({‘col1’:‘’,‘col2’: ...

  8. SDUT-3331_数据结构实验之链表八:Farey序列

    数据结构实验之链表八:Farey序列 Time Limit: 10 ms Memory Limit: 600 KiB Problem Description Farey序列是一个这样的序列:其第一级序 ...

  9. 【小程序案例】支付宝小程序-MQTT模器,IoT设备通过WSS接入阿里云IoT物联网平台

    支付宝小程序-MQTT模拟器通过WSS接入阿里云IoT物联网平台 小程序效果: 1. 准备工作 1.1 注册阿里云账号 开通阿里云账号,并通过支付宝实名认证 https://www.aliyun.co ...

  10. phpstorm2017破解版 2017.3.4 官网中文版

    phpstorm2017破解版是一款强大的PHP编程工具,新云软件园提供phpstorm激活下载,最新版PhpStorm 2017正式版改进了PHP 7支持,改进代码完成功能,PhpStorm 是最好 ...