Discuss / Python / 试试f的默认值

试试f的默认值

Topic source

cacaty

#1 Created at ... [Delete] [Delete and Lock User]

def add(x, y, f = abs):

    return f(x) + f(y)

print(add(-5, -16) )


  • 1

Reply