摘要:
文本获取:ThreeKingdoms.txt(三国演义.txt):https://python123.io/resources/pye/threekingdoms.txt 因为文本是复制到txt文档中的,第一次提示编码错误:'utf-8' codec can't decode byte 0xc8 i 阅读全文
posted @ 2021-11-22 15:42
吉祥知知
阅读(706)
评论(0)
推荐(0)
摘要:
哈姆雷特文本分析记录: def getText(): txt = open("hamlet.txt","r").read() #打开文件 r 读权限 txt = txt.lower() #把英文字母全部变成小写 for ch in '!"$%&()*+,-./:;<=>?@[\\]^_{|}~': 阅读全文
posted @ 2021-11-22 14:33
吉祥知知
阅读(1537)
评论(0)
推荐(0)

浙公网安备 33010602011771号