Let\'s imagine I have a dict :
d = {\'a\': 3, \'b\':4}
I want to create a function f that does the exact same thing than this function : >
How about the **kwargs trick?
def function(arg0, **kwargs): print("arg is", arg0, "a is", kwargs["a"], "b is", kwargs["b"]) d = {"a":1, "b":2} function(0., **d)
outcome:
arg is 0.0 a is 1 b is 2