![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Python
Wayne__2001
这个作者很懒,什么都没留下…
展开
-
Python三种装饰器模板
1.普通装饰器2.被装饰的函数带参数3.装饰器函数带参数原创 2020-03-30 13:47:04 · 123 阅读 · 0 评论 -
Python正则re模块基础知识
侵删。原创 2020-03-29 10:55:59 · 94 阅读 · 0 评论 -
Python简易百度图片爬虫
把url更换为百度图片搜索结果的网站,就可以随意所欲得爬虫啦~from urllib.request import *import reurl="https://image.baidu.com/search/index?tn=baiduimage&ipn=r&ct=201326592&cl=2&lm=-1&st=-1&fm=result&...原创 2020-03-28 15:45:37 · 237 阅读 · 0 评论 -
Python递归遍历目录代码
import osdirpath=input("请输入你要遍历的目录:")def getdir(dirpath,level=0): level+=2 if not dirpath: dirpath=os.getcwd() mylist=os.listdir(dirpath) for name in mylist: print("-...原创 2020-03-28 09:37:16 · 117 阅读 · 0 评论 -
Python部分基础知识
1.pass语句在Python中表示一个空的语句块。2.文档字符串的惯例是一个多行字符串,它的首行以大写字母开始,句号结尾。第二行是空行,从第三行开始是详细的描述。 强烈建议 你在你的函数中使用文档字符串时遵循这个惯例。你可以使用__doc__(注意双下划线)调用printMax函数的文档字符串属性(属于函数的名称)。请记住Python把 每一样东西 都作为对象,包括这个函数。我们会在后面的类...原创 2020-03-19 20:26:30 · 159 阅读 · 0 评论