In this screen, the answer code is the following:
def add(a, b): return a + b def partial(func, *args): parent_args = args def inner(*inner_args): return func(*(parent_args + inner_args)) return inner add_two = partial(add, 2) print(add_two(7))
the hint on this page says to use this, but I don’t believe I’ve seen it anywhere else in the prior DE courses. I’m not quite sure what the syntax is/what it’s called, how it works, and when I would use it otherwise.
appreciate any insight. Thanks!