Reputation: 717
I had this following rough code snippet.
param={'a':1,'b':2}
for k,v in param.items():
func2(k=v)
func2 is defined as:
func2(**kwargs):
print kwargs.get('a',None)
print kwargs.get('b',None)
When func2() is called the variable 'k' is being passed instead of it's value.How to pass k's value to func2(**kwargs) ?
Upvotes: 1
Views: 76