乐之之

知而行乐,乐而行之,天道酬勤,学无止境。

2022年11月7日

22、统计英文短文中前十个次数最多的单词

摘要: 题目: 在words_count.txt英文短文文件中, 找出前十个次数最多的单词。 思路: 1、创建一个新的空字典 2、遍历修饰所有单词,并逐个添加次数。 3、进行排序。 结果: word_count= {} with open("./words_count.txt",'r',encoding=' 阅读全文

posted @ 2022-11-07 12:24 乐之之 阅读(36) 评论(0) 推荐(0) 编辑