Unit: Unit 6: Functions • Interactive Practice
Interactive Python programming tutorial and practice in your browser.
# Trace flow of control through nested function execution
def step_three():
print(" -> Step 3: Inside innermost helper")
def step_two():
print(" -> Step 2: Entering middle function")
step_three()
print(" <- Step 2: Resuming after step_three returns")
def step_one():
print("-> Step 1: Entering outer function")
step_two()
print("<- Step 1: Resuming after step_two returns")
print("Program Start")
step_one()
print("Program End")