結果 : how to exit a method in python