先打开文档比如walden注意格式
f = open ("D:/aaa\Walden.txt","w")
f.close()
f = open("D:/aaa\Walden(1)","w")
同意大小写
Walden.txt = text lower()
File "<ipython-input-23-aaab1ce9ca07>", line 1
Walden.txt = text lower()
^
SyntaxError: invalid syntax
t=t.replace(',','').replace('.','').replace('"','').replace(':','')
t=t.split()
r=collections.Counter(t)
print(r)
博客提到要先打开文档,例如walden,同时强调要注意文档格式,并需同意大小写相关要求。
887

被折叠的 条评论
为什么被折叠?



