摘要: 今天入门爬虫的时候看到有这个一种写法: pic_url=re.findall('"objURL":"(.*?)",',html,re.S)所以,今天来简单分析一下这个东西:re.S的作用 下面主要看一下这个代码: 1 import re 2 a = """sdfkhellolsdlfsdfiooef 阅读全文
posted @ 2021-08-13 23:42 太上无情 阅读(260) 评论(0) 推荐(0)
摘要: 方法一:list1 = ['k1','k2','k3'] list2 = ['v1','v2','v3'] dic = dict(map(lambda x,y:[x,y],list1,list2)) >>> print(dic) {'k3': 'v3', 'k2': 'v2', 'k1': 'v1' 阅读全文
posted @ 2021-08-13 23:35 太上无情 阅读(136) 评论(0) 推荐(0)