Possible Duplicate:
Python: open multiple files using “with open”?
Does, With open() not works with python 2.6
I have seen other answers to help me with this. But I can't seem to get any of the solutions provided to work at all! Here is part of my code for it:
with open('Levels.dat', 'w') as l, open('Names.dat', 'w') as n:
I got this error:
with open('Levels.dat', 'w') as l, open('Names.dat', 'w') as n:
^
SyntaxError: invalid syntax
How do I fix this?