python
请问为什么g()里面不用加参数呢
```
def calc_prod(lst):
def g(lst):
def a(x,y):
return x*y
return reduce(a,lst)
return g
f = calc_prod([1, 2, 3, 4])
print f()
```
请问为什么g()里面不用加参数呢
```
def calc_prod(lst):
def g(lst):
def a(x,y):
return x*y
return reduce(a,lst)
return g
f = calc_prod([1, 2, 3, 4])
print f()
```
2019-10-08
举报