def test1(): print('in the test1') def test(): print('in the test') return test1 res=test()#先执行test()然后执行test1()输出, print(res())#最后执行的是test1() 没有return默认值为none不加括号返回的是地址,加了括号()就不是地址执行函数。
函数作用域
猜你喜欢
转载自www.cnblogs.com/wfl9310/p/8954732.html
今日推荐
周排行