次を使用して、あるファイルから読み取り、別のファイルに書き込もうとしています。
with open('example2') as inpf, open('outputrt','w') as outf:
for l in inpf:
outf.write(l)
しかし、1 行目で構文エラーが発生します。
"with open('example2') as inpf, open('outputrt','w') as outf:" pointing at "inpf,"
私のpythonバージョンは2.6です。構文に誤りがありますか?