結果 : stop loop when condition is met python