Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
从外部文件我生成以下字典:
mydict = { 'foo' : 123, 'bar' : 456 }
给定一个带有**kwargs参数的函数,如何从该字典中生成关键字参数?
**kwargs
def foo(**kwargs): pass foo(**{ 'foo' : 123, 'bar' : 456 })