What does the star operator mean, in a function call?

后端 未结 5 2066
没有蜡笔的小新
没有蜡笔的小新 2020-11-21 06:35

What does the * operator mean in Python, such as in code like zip(*x) or f(**k)?

  1. How is it handled internally in the int
5条回答
  •  醉话见心
    2020-11-21 07:24

    One small point: these are not operators. Operators are used in expressions to create new values from existing values (1+2 becomes 3, for example. The * and ** here are part of the syntax of function declarations and calls.

提交回复
热议问题