Discuss / Python / day10--2022/4/14

day10--2022/4/14

Topic source

Promethues

#1 Created at ... [Delete] [Delete and Lock User]
###高阶函数 :函数名作为一个函数的参数。 
#函数名也是一个变量,指向一个对应功能的函数
def addfuc(x,y,f):
    return f(x)+f(y)
print(addfuc(1,-3,abs))

  • 1

Reply