
python
爱看动漫的不醉
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
使用python在Excel表中写入数据
import xlrdfrom xlutils.copy import copy def write_value(self, row, col, value, filename): excel = xlrd.open_workbook(filename) ectype = copy(excel) sheet_data = ectype.get_sheet(0) sheet_data.write(row, col, value)原创 2021-07-15 17:14:43 · 501 阅读 · 2 评论 -
使用python将helloworld字符串倒序排序
使用python将helloworld字符串倒序排序def bubbleSort(string):lst = [ord(i) for i in string]for i in range(len(lst) - 1):for j in range(len(lst) - 1 - i):if lst[j+1] > lst[j]:temp = lst[j+1]lst[j+1] = lst[j]lst[j] = tempreturn lstif name == ‘main’:string原创 2021-07-14 18:52:30 · 487 阅读 · 0 评论 -
python3连接数据库出现1054, "Unknown column 'version' in 'field list'"错误
今天连接mysql数据库时出现1054, "Unknown column ‘version’ in ‘field list’"这个出现,一开始感觉自己写的代码没错,所以就上网搜了一下,结果发现报这个错误好像都是因为写的sql语句有错误,又重新检查了一遍,果然是因为sql语句的错误。cursor.execute(“select version”)这个和cursor.execute(“select v...原创 2019-02-08 21:45:13 · 3899 阅读 · 0 评论