def do_top(): wordcounter.analyze_file(args.input) with open(args.output, "w") as f: str = " ".join([x[0] for x in wordcounter.find_top10_words()]) f.write(str)
def do_count(): wordcounter.analyze_file(args.input) wordcounter.print_result(args.output)