結果 : how to write a class method in python