Код: Выделить всё
def f():
if cond1:
...
f()
elif cond2:
...
Код: Выделить всё
def f():
while True:
if cond1:
...
elif cond2:
...
break
else:
break
Подробнее здесь: https://stackoverflow.com/questions/793 ... -iteration
Код: Выделить всё
def f():
if cond1:
...
f()
elif cond2:
...
Код: Выделить всё
def f():
while True:
if cond1:
...
elif cond2:
...
break
else:
break