z

fext=open('z.txt',mode='r',encoding='utf-8')
fText=fext.read()
fext.close()

replacelist=['?' ',' '.' ';' "'" '!''\n','\ufeff']
for c in replacelist:
    fText=fText.replace(c,' ')
    print(fText)
fText=fText.split()
print(fText)

猜你喜欢

转载自www.cnblogs.com/chenjunyu666/p/9180314.html
z