摘要: import threading import time def test1(): print(1+5) def test2(): print(5+8) def test3(): print(5 + 8) def test4(): print(5 + 8) def test5(): print(5 阅读全文
posted @ 2021-02-10 22:51 萱娃 阅读(1277) 评论(0) 推荐(0) 编辑
摘要: 创建闭包: 1、闭包函数必须有内嵌函数; 2、内嵌内部的函数必须引用上一级函数的变量; 3、闭包函数必须返回内嵌函数 def closure_func(): in_func="in test" def f(): return in_func return fff=closure_func() #此时 阅读全文
posted @ 2021-02-10 19:33 萱娃 阅读(84) 评论(0) 推荐(0) 编辑