Args & KwargsΒΆ
*args and **kwargs allow you to pass an undefined number of arguments and keywords when calling a function.
https://github.com/wilfredinni/python-cheatsheet/blob/master/docs/cheatsheet/args-and-kwargs.md
def foo(*args):
...
>> x = [1, 2, 3, 4, 5]
>> foo(x)
>> foo(1, 2, 3, 4)
def foo(**kwargs):
...
>> x = {"a": 1, "b": 2, "c": 3}
>> foo(x)