結果 : how to write a log file in python