結果 : how to terminate a function in python