高阶函数
def add(a,b,f): a b是形参,f代表一个函数
return f(a)+f(b)
res = add(3,-6,abs)
print(res)
转载于:https://www.cnblogs.com/zaizaiaipython/p/7780750.html
高阶函数
def add(a,b,f): a b是形参,f代表一个函数
return f(a)+f(b)
res = add(3,-6,abs)
print(res)
转载于:https://www.cnblogs.com/zaizaiaipython/p/7780750.html