結果 : how to write console output to a text file python