Repeat-until or equivalent loop in Python

Question:

I am a beginner in Python programming. I am trying to work on this algorithm that finds convex hull using Graham’s scan method. However, in the pseudocode, there is a repeat ... until loop, which I could not figure out a way to write it in Python.

How do I write a repeat ... until loop in Python?

Asked By: Accay Hassan

||

Answers:

REPEAT
    ...
UNTIL cond

Is equivalent to

while True:
    ...
    if cond:
        break
Answered By: John La Rooy
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.