To break out of an enclosing loop statement, use the break statement:
loop { if condition: break doSomethingElse() }