I have a function with four parameters a, b, c and d as shown below.
def myfunc(a=None,b=None,c=None,d=None):
if <check which are not None>:
myfunc2(<pass those which are not None>)
I need to call another function myfunc2 inside this function but with only those parameters which the user has passed in myfunc. For example, if the user passes values for a and d in myfunc, then I need to call myfunc2 as:
myfunc2(a=a, d=d)
Is there a simple way to do this rather than write if cases for all possible combinations of a,b,c,d?