python list转字符串时报TypeError: sequence item 0: expected a bytes-like object, str found

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' '改成 ' '

发布了39 篇原创文章 · 获赞 8 · 访问量 3万+

猜你喜欢

转载自blog.csdn.net/jancywen/article/details/88650018
今日推荐