TypeError: tuple indices must be integers or slices, not str

错误1: TypeError: tuple indices must be integers or slices, not str 元祖的索引必须是整数或者切片,不能是字符 通过pymysql访问数据库,并查询数据。 解决方法: cursor默认获取的结果集是元组的形式,如果想用字典的形式输出,需要使用DictCursor 错误2: TypeError: list indices must be
相关文章
相关标签/搜索