In python f(**d) , values ββin the d dictionary are passed as keyword parameters for the f function. Similarly, f(*a) passes values ββfrom the array a as positional parameters.
As an example:
def f(count, msg): for i in range(count): print msg
Call this function with **d or *a :
>>> d = {'count': 2, 'msg': "abc"} >>> f(**d) abc abc >>> a = [1, "xyz"] >>> f(*a) xyz
source share