python partial偏函数
from functools import partial def func(a,b,c,d): return a + b + c + d tes = partial(func,1) print(tes) res = tes(2,3,4) print(res)
原文地址:https://www.cnblogs.com/baohanblog/p/12532638.html
时间: 2024-11-05 21:35:46
from functools import partial def func(a,b,c,d): return a + b + c + d tes = partial(func,1) print(tes) res = tes(2,3,4) print(res)
原文地址:https://www.cnblogs.com/baohanblog/p/12532638.html