用python做词频统计 假设有一个本地的txt文件,相对其进行词频统计,可以这样写:import timepath='C:\\Users\\zhangxiaomei\\Desktop\\Walden.txt'with open(path,'r') as text: words=text.read().split() print(words) for word in words: python 2023-10-30 54 点赞 0 评论 81 浏览