为什么这个返回的是None,这类问题如何调试找出问题发生原因?
def calc_prod(lst):
def sumc():
sum=1
for x in lst:
sum=sum*x
return sumc
f = calc_prod([1, 2, 3, 4])
print (f())
def calc_prod(lst):
def sumc():
sum=1
for x in lst:
sum=sum*x
return sumc
f = calc_prod([1, 2, 3, 4])
print (f())
2017-01-06
举报