python 去除txt文本中的空格、数字、特定字母等

使用场景:须要去除txt文本中的空格、数字、特定字母等。python 须要修改的txt文本叫作:train.txt 修改以后保存成:train_output.txtweb # ecoding=utf-8 ifn = r"train.txt" ofn = r"train_output.txt" infile = open(ifn,'r') outfile = open(ofn,'w') # 在使用
相关文章
相关标签/搜索