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