阅读背景:

从文件中删除所有非字母数字字符,并在python中使用相同的名称保存它

来源:互联网 

I have a .txt document containing a long body of text mixed with some special characters that I want to remove. I want to do something like re.findAll to extract all words and save the file with the other characters filtered out. How can I open the file, extract all non alphanumeric characters, and then save it with the same file name (with all spaces in place, obviously)? Is there a better way with re.sub?I have a .txt document containing a long body o




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: