我必须在多个文件中存储每个单词的字数统计。在Perl中,我使用了散列的散列,比如$wcCount{$file}{$word}。我不知道如何在python中做类似的事情。filename + word #creates a unique identifier for each word count我读了另一个类似问题的stackoverflow,但它不允许在单词再次计数时更新值。
我们应该读入一个只包含单词的文本文件,并根据频率和单词数量对它们进行排序。大写和小写。我没有解决这个问题的答案,我只是需要帮助。output a newline character after the line is finished
tell user compression is done
这是我的下一步