In code like zip(*x)
or f(**k)
, what do the *
and **
respectively mean? How does Python implement that behaviour, and what are the performance implications?
See also: Expanding tuples into arguments. Please use that one to close questions where OP needs to use *
on an argument and doesn't know it exists. Similarly, use Converting Python dict to kwargs? for the case of using **
.
See What does ** (double star/asterisk) and * (star/asterisk) do for parameters? for the complementary question about parameters.