import functools int("1010",base=2) #把一个参数固定住,形成新的参数 s=functools.partial(int,base=2) print(s('1111'))