- 博客(3)
- 收藏
- 关注
原创 python实现插入排序
对于少量的元素排序,插入排序是一个有效的算法,基本思想就是每次拿出一个数字,从右到左对数字进行比较,并将它放在正确的位置,python代码实现如下:countLIst = [9,1,44,23,123,77,312,323,53]for j in range(1,len(countLIst)): key = countLIst[j] i = j - 1 while i&...
2018-10-27 20:06:10 1090
原创 使用xpath遇到 Unicode strings with encoding declaration are not supported. Please use bytes input or XM
使用xpath遇到 Unicode strings with encoding declaration are not supported. Please use bytes input or XML fragments without declaration.的问题解决方法在使用下etree.HTML时有时候会出现这样的问题代码如下 response = response.conte...
2018-07-03 05:43:14 4067
原创 用python对word文档表格里面的内容进行翻译
import jsonimport reimport docximport requestsimport timedef trans(str): # 模拟浏览器发送请求 url = "http://fanyi.baidu.com/basetrans" headers = { "User-Agent": "Mozilla/5.0 (iPhone;...
2018-04-28 15:35:03 1124
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人