摘要: defaultdict from collections import defaultdict s=[('yellow',1),('blue', 2), ('yellow', 3), ('blue', 4), ('red', 1)] d=defaultdict(list) # 当键不存在时,添加键并 阅读全文
posted @ 2022-01-12 17:38 我在路上回头看 阅读(57) 评论(0) 推荐(0) 编辑
摘要: import urllib.parse ## urlparse() 对url进行解析,并对url按照一定格式进行拆分,返回一个包含6个字符串的元组(协议,位置,路径,参数,查询,判断), 可以将获得的元组强转为list来进行取值 url = "http://www.baidu.com/s?usern 阅读全文
posted @ 2022-01-12 17:17 我在路上回头看 阅读(59) 评论(0) 推荐(0) 编辑
摘要: from pytz import utc from apscheduler.schedulers.background import BackgroundScheduler from apscheduler.jobstores.mongodb import MongoDBJobStore from 阅读全文
posted @ 2022-01-12 14:36 我在路上回头看 阅读(208) 评论(0) 推荐(0) 编辑