我正在尝试从一个文件中读取并使用以下命令写入另一个文件:
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。语法有错误吗?