摘要: 闭包函数 1.闭:定义在函数内部的函数 2.包:内部函数使用了外层函数名称中的名字 def outer(): #外部函数 x = 999 def inner(): #内部函数:使用的是外层函数的返回值 print('from outer>>>inner',x) return inner(外层函数的返 阅读全文
posted @ 2023-07-16 09:15 半糖+奶茶 阅读(12) 评论(0) 推荐(0)