SyntaxFix
Write A Post
Hire A Developer
Questions
factor into a function/method and use early return, or rearrange your loops into a while-clause. goto/exceptions/whatever are certainly not appropriate here.
def do_until_equal(): foreach a: foreach b: if a==b: return