結果 : run for loop until condition is met python