結果 : write formatted string to file python