python 3.5 报错TypeError:can't concat str to bytes 、TypeError: write() argument must be str, not bytes

原程序: out = open('train_data.txt', 'w') for sentence in sentences: out.write(sentence.encode("utf-8")+"\n") print("done!") 报错:TypeError:can't concat str to byteshtml 修改成:python out.write(sentence.e
相关文章
相关标签/搜索