How to generate a `kwargs` list?
11,302
def foo(**kwargs):
pass
foo(**{ 'foo' : 123, 'bar' : 456 })
Author by
Paul Manta
Updated on June 21, 2022Comments
-
Paul Manta about 2 years
From an external file I generate the following dictionary:
mydict = { 'foo' : 123, 'bar' : 456 }
Given a function that takes a
**kwargs
argument, how can generate the keyword-args from that dictionary?