File Handling Write In Python