from functools import partial
def add(a, b, c):
print("a=", a)
print("b=", b)
print("c=", c)
return a + b + c
addPlus = partial(add, 1, 2)
print(addPlus(3))
functools.partial(FuncA,p1,p2,…)用于把函数FuncA的前几个参数分别固定为p1,p2,…例from functools import partialdef add(a, b, c): print("a=", a) print("b=", b) print("c=", c) return a + b + c