Effective Python
latest
前言
第一章:用Pythonic方式来思考
第二章:列表与字典
Effective Python
Docs
»
Effective Python:改善Python程序的90个建议!
Edit on GitHub
Effective Python:改善Python程序的90个建议!
¶
前言
第一章:用Pythonic方式来思考
1.1 确认自己所用的Python版本
1.2 遵循 PEP8 风格指南
1.3 了解 bytes 与 str 的区别
1.4 比起C-样式格式化字符串和str.format, 更喜欢插值f-字符串
1.5 用辅助函数取代复杂的表达式
第二章:列表与字典
2.1 了解如何切片序列
2.2 避免在单一表达式中步进和切片
2.3 在切片时优先考虑全部拆包
2.4 使用关键字参数按复杂条件排序
Read the Docs
v: latest
Versions
latest
Downloads
html
On Read the Docs
Project Home
Builds
Free document hosting provided by
Read the Docs
.