<span style="font-family: Arial, Helvetica, sans-serif;">f = codecs.open('C:\Users\Administrator\Desktop\textmining_experiment2\wordseg\traintxt500\%d\%d.txt' % (j,i),'r',"gb18030")</span>
for line in f:
s += line.strip().encode('utf-8')
最后
以上就是强健大碗最近收集整理的关于【python问题解决】去除文本中的所有换行符的全部内容,更多相关【python问题解决】去除文本中内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复