Q:

Does a Try/Except block create a stack of its own?

def f(n):
    if n>0:
        print(1/n)
    else:
        raise Exception
try:
    f(0)
except Exception:
    print("Error!")

When Exception is raised inside f(n), does the interpreter return to the try/except block (which implies the try/except has its own block), or is that error being raised and handled immediately (which implies the opposite) ?

A:

Actualy it raises from the f(n) function up until it finds a try/catch handler or the end of the program stack. In this last case, the program will stop and raise the error ti the user (through the console).
this will raise the exception up to the user:
def f(n):
    raise Exception

f(5)

But if you add a try/catch in between, the exception will be handle by the except block:
def f(n):
    raise Exception

try:
    f(5)
except:
    print('Error handled')

