各位,python版本3.88,用不了apply函数
def fn(a): return a+1 apply(fn,[1,2,3])
报错提示:name 'apply' is not defined
请问python3还有其他方法可以多次调用一个函数吗?
def fn(a): return a+1 x = list(map(fn, [1, 2, 3])) print(x) '''--result [2, 3, 4] '''