摘要: # 导入requests 和 BeautifulSoupimport requestsfrom bs4 import BeautifulSoupdef download_page(url): # 定义头部,用来骗过浏览器 headers ={'User-Agent': 'Mozilla/5.0 (W 阅读全文
posted @ 2020-07-17 22:00 月为暮 阅读(497) 评论(0) 推荐(0) 编辑
摘要: from typing import List# 这道题是比较容易的,只需要遍历一遍就好了class Solution: def searchInsert(self, nums: List[int], target: int) -> int: # 这里定义一个变量用于接收索引 num_index = 阅读全文
posted @ 2020-07-17 16:47 月为暮 阅读(466) 评论(0) 推荐(0) 编辑