2008-10-14から1日間の記事一覧
ユーザーの指定したファイルの単語数カウントプログラムをつくってみた import string def numwords(s): list = string.split(s) return len(list) txt = raw_input("fairumeiwonyuuryoku") inp = open(txt, "r") total = 0 for line in inp: total = total …
ユーザーの指定したファイルの単語数カウントプログラムをつくってみた import string def numwords(s): list = string.split(s) return len(list) txt = raw_input("fairumeiwonyuuryoku") inp = open(txt, "r") total = 0 for line in inp: total = total …