函数的嵌套定义

def outer():
x = 1
print("outer")
def innre():
print("innre")
return innre
res = outer()
print(res)
res()
结果:outer
  这个空函数的内存innre的地址
  <function outer.<locals>.innre at 0x000001F33EA52D08>
  innre
"""
函数内定义函数的应用场景


"""
原文地址:https://www.cnblogs.com/yangxinpython/p/11164512.html