結果 : python write output of function to file