def on_load_words(self): with askopenfile() as f: self.words = count(load(f)) self.on_show_words()
def top_words(words, qty=20): return lines(top(count(words), qty))
def count_words(words): return lines(asc(count(words)))