But you can define functions inside of functions (recursively).
def function1():
print ("hello outer")
def function2():
print ("hello inner")
function2()
function1()
Output: hello outer
hello inner