結果 : how to terminate loop in python