import collections
f=open("D:\python\Walden.txt","r").read()
f=f.replace(',','').replace('.','').replace('"','').replace(':','')
f=f.split()
r=collections.Counter(f)
print(r)
import collections
f=open("D:\python\Walden.txt","r").read()
f=f.replace(',','').replace('.','').replace('"','').replace(':','')
f=f.split()
r=collections.Counter(f)
print(r)
3315

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