How to use ** (double asterisk) in function calls with dictionary elements in Python

1 Answer

0 votes
def function(aa, bb, cc):
    print(aa, bb, cc)

d = {'aa': 'python', 'bb': 'java', 'cc': 'c#'}

function(**d)


'''
run:

python java c#

'''

 



answered Dec 17, 2017 by avibootz

Related questions

...