2011-03-07 51 views

回答

9

当然,你可以通过一个字典为kwargs

def foo(a, b, c): 
    print a, b, c 

d = {'a': 1, 'b': 2, 'c': 3} 
foo(**d) 

输出:

1 2 3 
相关问题