# Python3.x(3.1以上) Python2.x(2.7) with open(load.txt) as loadfile, open(save.txt) as savefile: #ここに処理を書く # Python3.x(3.0) とか Python2.x(2.6以下)