This argument unpacks the (kinda) operator.
args = [1, 2, 3]
fun(*args)
coincides with
fun(1, 2, 3)
(for some called fun).
There is also a function definition function that means "all other positional arguments":
def fun(a, b, *args):
print('a =', a)
print('b =', b)
print('args =', args)
fun(1, 2, 3, 4)
source
share