This apply()
function returns the result of a function or class object called with supplied arguments.
apply(function, args[, kwargs])
Here,
Note: This function is obsolete. Use function(*args, **kwargs)
instead of apply(function, args, kwargs)
.
>>> def fun1(a, b):
... return a, b
...
>>> apply(func1, (7, 13))
(7, 13)
>>> def func2(a, b, c=None):
... return a, b, c
...
>>> apply(func2, (1, 2), {'c': 3})
(1, 2, 3)