петля Python, пока не встретится состояние
finished = False
while not finished:
... do something...
finished = evaluate_end_condition()
Disgusted Dove
finished = False
while not finished:
... do something...
finished = evaluate_end_condition()