Python List find方法报错 TypeError: 'str' does not support the buffer interface
2016-06-26 20:22
931 查看
deviceList[1].find('device')
List使用find方法时,报错误:
TypeError: 'str' does not support the buffer interface
In python 3, bytes strings and unicodestrings are now two different types. Bytes
strings are b"" enclosed strings
上述语句改为:deviceList[1].find(b'device') 就好了,加了个小b
List使用find方法时,报错误:
TypeError: 'str' does not support the buffer interface
In python 3, bytes strings and unicodestrings are now two different types. Bytes
strings are b"" enclosed strings
上述语句改为:deviceList[1].find(b'device') 就好了,加了个小b
相关文章推荐
- Python3 入门教程 简单但比较不错
- python3图片转换二进制存入mysql
- python3批量删除豆瓣分组下的好友的实现代码
- linux下python3连接mysql数据库问题
- Python3 能振兴 Python的原因分析
- 在windows系统中实现python3安装lxml
- Python3基础之基本运算符概述
- Python3基础之条件与循环控制实例解析
- Python3实现生成随机密码的方法
- Python3基础之输入和输出实例分析
- Windows下实现Python2和Python3两个版共存的方法
- Python3使用requests包抓取并保存网页源码的方法
- Python3 正在毁灭 Python的原因分析
- Python3连接MySQL(pymysql)模拟转账实现代码
- Python3基础之基本数据类型概述
- Python3基础之函数用法
- 让python同时兼容python2和python3的8个技巧分享
- Python3实现连接SQLite数据库的方法
- python3.3实现乘法表示例
- python3实现域名查询和whois查询功能