結果 : how to write a method in python