Python · Functions
*args / **kwargs
Collects extra positional arguments into a tuple and extra keyword arguments into a dictionary.
Syntax
def f(*args, **kwargs):Example
Open in the lab
Notes
The names args and kwargs are conventions; the star is what matters.
More in this group
Learn this in the course
Reference pages are the quick answer. The course explains the why, shows the full example and ends with a challenge.