Skip to main content
added 126 characters in body
Source Link
Daraan
  • 5.3k
  • 9
  • 26
  • 52

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.

See What do ** (double star/asterisk) and * (star/asterisk) inside square brakets mean for class and function declarations in Python 3.12+? for the complementary question when used for type parameters.

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.

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.

See What do ** (double star/asterisk) and * (star/asterisk) inside square brakets mean for class and function declarations in Python 3.12+? for the complementary question when used for type parameters.

Finally stumbled on the other corresponding related question
Source Link
Karl Knechtel
  • 61.7k
  • 14
  • 136
  • 195

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.

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.

See What does ** (double star/asterisk) and * (star/asterisk) do for parameters? for the complementary question about parameters.

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.

improve title (parallelism with the other canonical)
Source Link
Karl Knechtel
  • 61.7k
  • 14
  • 136
  • 195

What do the *** (stardouble star/asterisk) and *** (double starstar/asterisk) operators mean in a function call?

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.

See What does ** (double star/asterisk) and * (star/asterisk) do for parameters? for the complementary question about parameters.

What do the * (star) and ** (double star) operators mean in a function call?

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.

What do ** (double star/asterisk) and * (star/asterisk) mean in a function call?

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.

See What does ** (double star/asterisk) and * (star/asterisk) do for parameters? for the complementary question about parameters.

add see-also with closure guidance; focus and de-opinionate the question
Source Link
Karl Knechtel
  • 61.7k
  • 14
  • 136
  • 195
Loading
improve title to match the corresponding canonical for parameters a bit better
Link
Karl Knechtel
  • 61.7k
  • 14
  • 136
  • 195
Loading
updated title to reflect entire scope of the question
Link
MisterMiyagi
  • 53.8k
  • 14
  • 131
  • 138
Loading
Post Reopened by Georgy, Daniel Widdis, tgdavies
edited title
Link
smci
  • 34.2k
  • 21
  • 118
  • 153
Loading
edited tags
Link
ShadowRanger
  • 158.2k
  • 12
  • 224
  • 318
Loading
Post Closed as "Duplicate" by Aran-Fey python
deleted 193 characters in body
Source Link
Aran-Fey
  • 44.2k
  • 13
  • 116
  • 163
Loading
Post Reopened by Aran-Fey python
Active reading.
Source Link
Peter Mortensen
  • 31.1k
  • 22
  • 111
  • 134
Loading
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link
URL Rewriter Bot
URL Rewriter Bot
Loading
Edited and removed language tag from question title.
Link
martineau
  • 124.3k
  • 29
  • 181
  • 320
Loading
edited tags; edited title
Link
tshepang
  • 12.5k
  • 25
  • 99
  • 140
Loading
Loading
added 5 characters in body
Source Link
Loading
insert duplicate link
Source Link
Loading
Post Closed as "exact duplicate" by Adrien Plisson, SilentGhost, Grzegorz Oledzki, jfs, Greg Hewgill
deleted 2 characters in body
Source Link
SilentGhost
  • 322.7k
  • 67
  • 312
  • 294
Loading
edited title; added 58 characters in body; added 24 characters in body
Source Link
psihodelia
  • 30.7k
  • 35
  • 114
  • 161
Loading
added 14 characters in body
Source Link
Joe Mastey
  • 27.1k
  • 13
  • 83
  • 104
Loading
edited tags
Link
SilentGhost
  • 322.7k
  • 67
  • 312
  • 294
Loading