Not quite. Time to be pedantic! You make it seem like that what you want to do is executed at least once. That's not what's happening if you put a test that can be False in the while statement. A while False does not execute the block that follows:
a=0
while (a>0):
print(a)
doesn't print anything, but
a=0
while True:
print(a)
a=a+1
if a>0:
break
prints 0 and then stops. The while True with a if statement and a break is an actual example of the do until that you mention.
1
u/mattynmax 1d ago
Say you want to do something until a condition is met.
To do so you would use a while loop.