У меня сложный код в python с условием внутри try:
try: if condition is True: execute the code else: go to exception and don't execute the code except: execute the except statement
Я хочу выйти из оператора try, если условие выполнено
Просто вручную вызовите исключение:
try: if condition: your code else: raise Exception('Exception message') except: # except code here