def f(): try: raise Exception except: return finally: print("exit") f()