调用函数,为什么这么写不对
def calc_prod(lst):
def ji(l):
s=1
for i in l:
s=s*i
return s
return ji
f = calc_prod([1, 2, 3, 4])
print f()
def calc_prod(lst):
def ji(l):
s=1
for i in l:
s=s*i
return s
return ji
f = calc_prod([1, 2, 3, 4])
print f()
2020-05-18
举报