python闭包函数例子 发表于 2019-10-24 | 更新于 2023-01-11 python闭包函数123456789101112131415def fn(): l = [] def inner(): l.append(1) print(l) return innerinner = fn()print(inner)inner()inner() (不再每天专门写笔记了,不过还是要坚持在github上传自己学的demo)