結果 : exit loop if condition is met python