*args / **kwargs
Takes a variable number of arguments.
Syntax
def name(*args, **kwargs):
Description
*args collects an indefinite number of positional arguments into a tuple, **kwargs collects named arguments into a dictionary.
Example
Loading editor…
Expected output
10
When to use?
Helper functions where it's unclear how many arguments will come.