Turn parameters into a dictionary : Function Dictionary Parameters « Function « Python






Turn parameters into a dictionary

Turn parameters into a dictionary

def f(**args): print args

print f()

print f(a=1, b=2)


           
       








Related examples in the same category

1.Function parameters: using the double asterisk operatorFunction parameters: using the double asterisk operator
2.Collecting ParametersCollecting Parameters
3.Parameter passing: mixed with dictionary and tupleParameter passing: mixed with dictionary and tuple