闭包:函数中还有定义的函数,并且里面的函数要用到外面函数的参数

1 def foo(test):
2     def foo1()
3         print("hello word!")
4         print(test = test+1)
5     return foo1
6 
7 f1 = foo()
原文地址:https://www.cnblogs.com/tester-go/p/8086040.html