Se a resposta satisfazer a condição, como impedi -la para correr mais adiante em Python

if the answer satisfies the condition so how to stop it to run further ahead in python
Anxious Ant