随笔分类 - python_常用库
摘要:这里主要介绍一些heapq的常用方法 from heapq import * 1 heapify(list) 将序列list变成heap结构 2 heappush(heap, item), 向序列heap中插入一个item 3 heappop(heap), pop出堆中的最小值 4 heaprepl
阅读全文
摘要:本人使用Beautifulsoup需要理解的概念,所以在此记录。 详细方法请参考 官方网址 1 Beautifulsoup类中的基本元素 soup = Beautifulsoup(...) 1.1 Tag: 标签,最基本单位,分别用<>和</>来表示开头和结。soup.Tag 1.2 Name: 标
阅读全文
摘要:多个iterable连接 chain 1 itertools.chain(*iterable) 将多个序列作为一个单独的序列返回 在iter中添加判断类 compress ifiter ifterfalse tabkewihe 1 itertools.compress(data, selector)
阅读全文
摘要:内容主要来自www.ziwenxie.site/2016/12/10/python-stand-library-collections/,在此感谢 这里我们介绍几种类型 1 defaultdict 2 OrderedDict 3 deque 4 ChainMap 5 Couter 6 nametup
阅读全文
摘要:主要学习了imooc的@飞雀老师的课,所以做一个笔记 1 三种常见的request 2 基本相应的api 3 自定义request原理图 4 http认证的一个创建类的方式 5 代理 6 cookie 7 session
阅读全文
摘要:Queue.qsize() 返回队列的大小 Queue.empty() 如果队列为空,返回True,反之False Queue.full() 如果队列满了,返回True,反之FalseQueue.full 与 maxsize 大小对应 Queue.get([block[, timeout]])获取队
阅读全文
浙公网安备 33010602011771号