do while


There is no do-while in Python, but you can emulate it:


examples/advanced/do_while_pseudo.py
while True:
   do_stuff()
   if not loop_condition():
       break

examples/advanced/do_while.py
x = 0

while True:
   x += 1
   print(x)
   if x > 0:
       break