摘要: list.append(object) 向列表中添加一个对象objectlist.extend(sequence) 把一个序列seq的内容添加到列表中 a = ['a','aa','aaa'] b = ['B','BB','BBB'] c = ['C','CC','CCC'] a.append(b) 阅读全文
posted @ 2022-01-14 18:15 木棉花的漂泊 阅读(33) 评论(0) 推荐(0) 编辑
摘要: 代码已调试通过 # 导入第三方包 import random import re import time import pandas as pd import requests # 构造请求头 headers = { 'Accept': '*/*', 'Accept -Enconding': 'gz 阅读全文
posted @ 2022-01-14 16:06 木棉花的漂泊 阅读(259) 评论(0) 推荐(0) 编辑
摘要: 将赋值none改为‘’,即: aqi =''aqiInfo =''aqiLevel = ''便可以解决 阅读全文
posted @ 2022-01-14 08:50 木棉花的漂泊 阅读(3788) 评论(0) 推荐(0) 编辑
摘要: “TypeError: a bytes-like object is required, not 'str'”错误 解决:使用.join函数 print("type(response_sum) ",type(response_sum)) ymd = re.findall("ymd:'(.*?)'," 阅读全文
posted @ 2022-01-14 08:40 木棉花的漂泊 阅读(168) 评论(0) 推荐(0) 编辑