結果 : how to implement a method in python