2014-11-19から1日間の記事一覧
自分用メモ 全部読みたいとき def read_file(filepath): with open(filepath, 'r') as stream: contents = stream.read() print contents 1行ずつ def read_file(filepath): with open(filepath, 'r') as stream: for line in stream: print line
自分用メモ 全部読みたいとき def read_file(filepath): with open(filepath, 'r') as stream: contents = stream.read() print contents 1行ずつ def read_file(filepath): with open(filepath, 'r') as stream: for line in stream: print line