結果 : how to terminate a loop in python