два файла с открытым
with open('a', 'w') as a, open('b', 'w') as b:
do_something()
Embarrassed Emu
with open('a', 'w') as a, open('b', 'w') as b:
do_something()