摘要:
创建只有一个元素的tuple,需要用逗号结尾消除歧义 a_tuple = (2,) tuple中的list mixed_tuple = (1, 2, ['a', 'b']) print("mixed_tuple: " + str(mixed_tuple)) mixed_tuple[2][0] = ' 阅读全文
摘要:
# HTTP响应状态码 ## 1xx:临时响应 #### 表示临时响应并需要请求者继续执行操作的状态代码。 100 **继续**请求者应当继续提出请求。服务器返回此代码表示已收到请求的第一部分,正在等待其余部分。 101 **切换协议**请求者已要求服务器切换协议,服务器已确认并准备切换。 ## 2 阅读全文
摘要:
二分查找 选择排序 递归 快速排序 广度优先搜索 狄克斯特拉算法 贪婪算法 二分查找 def binary_search(lst,item): low = 0 high = len(lst)-1 while low <= high: mid = (high+low)//2 if item == ls 阅读全文
摘要:
import requests from bs4 import BeautifulSoup import openpyxl wb=openpyxl.Workbook() sheet=wb.active sheet.title='product1' headers = {'User-Agent': ' 阅读全文