結果 : end loop if condition is met python