python调用split()出现/ufeff如何解决

sentences_1 = open(path_1,"r").readlines()

sentences_1 = [s.encode('utf-8').decode('utf-8-sig').strip("\n").split() for s in sentences_1]


关键是:encode('utf-8').decode('utf-8-sig')

阅读更多
版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u011012422/article/details/79972922
个人分类: python
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

关闭
关闭
关闭