为什么我与评论区代码写得完全一样,运行就会报 'int' object is not callable?求解答啊
def calc_prod(lst):
def lazy_prod():
x=1
for i in lst:
x=x*i
return x
return lazy_prod()
f=calc_prod([1,2,3,4])
print f()
def calc_prod(lst):
def lazy_prod():
x=1
for i in lst:
x=x*i
return x
return lazy_prod()
f=calc_prod([1,2,3,4])
print f()
2016-02-29
举报