将读取方式按下面的代码修改(一个是把’b’改为‘wb’,一个是把‘\n’改为b’\n’)
with open('20NG.txt', 'wb') as f:
for line in docLst:
f.write(line + b'\n')
将读取方式按下面的代码修改(一个是把’b’改为‘wb’,一个是把‘\n’改为b’\n’)
with open('20NG.txt', 'wb') as f:
for line in docLst:
f.write(line + b'\n')