sub in sub
Functions can be defined inside functions.
def f():
print("in f")
def g():
print("in g")
g()
f()
#g() # does not exist here
They are scoped locally
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
Functions can be defined inside functions.
def f():
print("in f")
def g():
print("in g")
g()
f()
#g() # does not exist here
They are scoped locally