How to return to stop multiple levels up

  function, python

I want to be able to return to stop the parent function inside a function like this:

def FunctionBeingRan():
    #Running Script
    def stop():
        return #return to stop the parent function
    
FunctionBeingRan().stop

Anyone know how to do this

Source: Python Questions

LEAVE A COMMENT