with block for multiple files

Yingjie Lan lanyjie at yahoo.com
Mon Nov 1 07:05:00 CET 2010

> Guido's time machine strikes again! It's already in Python
> 3; your
> example would be spelled:
> with open('scores.csv') as f, open('grades.csv', wt) as g:
>     g.write(f.read())

Indeed! Thanks, Chris and James.



More information about the Python-list mailing list