摘要: def process_line(line, hist): """Adds the words in the line to the histogram. Modifies hist. line: string hist: histogram (map from word to frequency) """ # replace hyphens with spaces before splitting line = line.replace('-', ' ') for word in line.split 阅读全文
posted @ 2013-10-03 12:50 l3sl!e 阅读(303) 评论(0) 推荐(0) 编辑