from functools import partial def add(x,y,z): return x+y+z add_par=partial(add,1,2) # 生成偏函数对象,先传几个固定的参数 add_par(3) # 在传剩下的参数