有了这个Python备忘录,代码拿来即用
2020-12-08 本文已影响0人
朱卫军AI_Python
这段时间代码写的少了,周末用python写一个小爬虫,却发现连线程的一些方法都不记得了,还得百度查教程。工作越忙,记性越差,发现我疏远了代码,代码也疏远了我。
周末在家逛Github,发现一个让人惊喜的项目,1.7万star,名叫python-cheatsheet。

Github:https://github.com/gto76/python-cheatsheet
这个项目是作者汇总的Python速查表,可以查到python各种语法、内置库、第三方库的用法,而且提供了很多可用的代码。

该速查表有7大板块内容
1、容器:包括列表、字典、集合等
2、类型:包括字符串、日期时间、数字等
3、句法:包括类、错误处理、装饰器等
4、系统:包括输入输出、文件操作、系统命令等
5、数据:包括JSON、CSV、Bytes等各种数据格式的处理方法
6、进阶:包括进程、协程等
7、库:包括Numpy、Web、Scraping等
以列表为例,文档提供了List各种主要函数、方法:

再比如标准库CSV的使用:



这是作者根据自己的经验做的速查表,从内容上来说已经很全面,而且自查方便。
大家也可以做一份速查表,把常用的语法分门别类记录下来,日子久了那将是一笔不小的财富。
获取PDF版本可在公众号后台回复:速查表