結果 : write formatted text to file python