Traceback (most recent call last):
File "process.py", line 25, in <module>
s=b' '.join(text)
TypeError: sequence item 0: expected a bytes-like object, str found
text中为str不是字节,不能用字节连接 将b' '改成 ' '
博客指出text中的内容为str类型而非字节类型,不能进行字节连接操作,解决办法是将b' '改成 ' ',这属于编程中数据类型处理的常见问题。
Traceback (most recent call last):
File "process.py", line 25, in <module>
s=b' '.join(text)
TypeError: sequence item 0: expected a bytes-like object, str found
text中为str不是字节,不能用字节连接 将b' '改成 ' '
761
1671
5389
1万+

被折叠的 条评论
为什么被折叠?
