摘要: # print() # input() # len() # type() # open() # tuple() # list() # int() # bool() # set() # dir() # id() # str() # print(locals()) #返回本地作用域中的所有名字 # print(globals()) #返回全局作用域中的所有名字 # global 变量 # no... 阅读全文
posted @ 2018-02-22 15:18 CHVV 阅读(226) 评论(0) 推荐(0)
摘要: # 内部函数对外部函数作⽤域⾥变量的引⽤(⾮全局变量),则称内部函数为闭包。 # def test(num1): print("------1-----") def inner(num2): print("----2---") print(num1+num2) print("----3---") return inner ret... 阅读全文
posted @ 2018-02-22 11:28 CHVV 阅读(122) 评论(0) 推荐(0)