For a function with multiple arguments like this:
def f(a, b, c):
return a + b + c
it is straightforward to define a new function as follows:
def g(a, *args):
return f(a, *args)
here, a is the first argument of f(). What if I would like to specify the second argument of f(), namely:
def g(b, *args):
# return f(???)
You can unpack some of the arguments from
*args:Output:
6