当前位置: 首页 > 工具软件 > Walden > 使用案例 >

Walden单词词频统计任务

松波
2023-12-01
import collections
f=open(r'C:\\Users\\21033\\Desktop\\Walden.txt','r')
a = f.read().split()#分隔开每个单词
print(collections.Counter(a))#统计计算
 类似资料: