这样咋不对
def calc_prod(lst):
def lazy_prod():
num = 1
for i in lst:
num=num *i
return num
return lazy_prod
f = calc_prod([1,2,3,4])
print f()
def calc_prod(lst):
def lazy_prod():
num = 1
for i in lst:
num=num *i
return num
return lazy_prod
f = calc_prod([1,2,3,4])
print f()
2017-01-12
举报