[python] How to empty a file using Python