摘要: 1 def getTaxt(): 2 txt=open('hamlet.txt') 3 txt = txt.lower() 4 for ch in '!"#$%&()*+,-./:;<=>?@[\\]^_‘{|}~': 5 txt = txt.replace(ch, " ") #将文本中特殊字符替换 阅读全文
posted @ 2020-04-06 15:21 ghhzaq 阅读(190) 评论(0) 推荐(0) 编辑