LoginSignup
2
2

More than 3 years have passed since last update.

[Python]* , ** (可変長引数と展開)

Last updated at Posted at 2021-03-31

* , ** (可変長引数と展開)

*argsや**kwargsといった形で引数を定義すると、
任意の数の引数を受け取る事ができる。

* と ** は引数の受け取り方が違う
  1. *args => Non-Keyword引数...タプル型で受け取る
  2. **kwargs => Keyword引数...dict型で受け取る
2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2