随笔分类 - Python
摘要:文本获取:ThreeKingdoms.txt(三国演义.txt):https://python123.io/resources/pye/threekingdoms.txt 因为文本是复制到txt文档中的,第一次提示编码错误:'utf-8' codec can't decode byte 0xc8 i
阅读全文
摘要:哈姆雷特文本分析记录: def getText(): txt = open("hamlet.txt","r").read() #打开文件 r 读权限 txt = txt.lower() #把英文字母全部变成小写 for ch in '!"$%&()*+,-./:;<=>?@[\\]^_{|}~':
阅读全文
摘要:运行--cmd pip install requests 第一次运行的时候报错了,看了一下执行python目录是正确的(因为电脑安装了2个python) 关闭cmd,重新打开再次运行就正常了。
阅读全文

浙公网安备 33010602011771号