this is the assignment Write a function partial that takes another function and a value as in data. Partial should return a new function with the same function as the given function but there the first argument to the given functuin is bound to a value that was given as second argument to partial
run example:
>>> def add(n, m): return n + m
...
>>> add_five = partial(add, 5)
>>> add_five(3)
8
>>> add_five(16)
21
i dont quite understand the assignment and i am new to function in function but ive done this so far and i think im on the right way?
def add(n,m):
return n+m
def partial(func,number):
def add_n(number):
return func(0,number)+number
return add_n