How to write in a file with Python