functools

1、偏函数

import functools
int("1010",base=2)

#把一个参数固定住,形成新的参数
s=functools.partial(int,base=2)
print(s('1111'))
View Code
原文地址:https://www.cnblogs.com/pdun/p/11320445.html