Python中允许在同一个 with 语句中打开多个⽂件。
with open( 'a.txt ', 'r ') as f1, open( 'b.txt ', 'w ') as f2:
data = f1.read()
f2.write(data)
正确
错误