高阶函数

把一个函数做为参数传递给函数的函数,称为高阶函数。函数

def func(a,b,f):    return f(a)+f(b)rest = func(3,-19,abs)print(rest)结果是22
相关文章
相关标签/搜索