5. 请问如何访问 funIn() 呢?
5. 请问如何访问 funIn() 呢?def funOut():
def funIn():
print('宾果!你成功访问到我啦!')
return funIn
why
funOut()()
宾果!你成功访问到我啦! def funOut():
def funIn():
print('宾果!你成功访问到我啦!')
return funIn
函数funOut()的返回结果是funIn
funOut()相当于funIn
funOut()()相当于funIn()
funIn()会执行
print('宾果!你成功访问到我啦!')
页:
[1]