how to use one with as statement to open two files python

Solutions on MaxInterview for how to use one with as statement to open two files python by the best coders in the world

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
pinned-register now
showing results for - "how to use one with as statement to open two files python"
Cleo
10 Jun 2018
1with open('a', 'w') as a, open('b', 'w') as b:
2    do_something()