这个错在哪里了
def calc_prod(lst):
def lazy_sum():
sum=1;
for x in lst:
sum=sum*x
return sum
return lazy_sum()
f = calc_prod([1, 2, 3, 4])
print f()
def calc_prod(lst):
def lazy_sum():
sum=1;
for x in lst:
sum=sum*x
return sum
return lazy_sum()
f = calc_prod([1, 2, 3, 4])
print f()
2017-03-21
举报