2017-02-11から1日間の記事一覧

pythonのソースコードを調べる

ファイル内の単語頻度をしらべる def freqdist_count(path_name): """ 指定したpath_nameを読み込んで、そのテキスト内単語の頻度を表示する """ count_dic = {} for path in path_name[:]: with open(path,"r") as f: text = f.read() #コメントを削除(複…