結果 : how to write code to a file in python