Skip to content

Variable length arguments

This short sub-section provides additional information on variable length arguments as they are used commonly in Python code due to their conciseness. For a complete description of variable length arguments, see the official Python documentation here which describes variables length arguments as:

var-positional: specifies that an arbitrary sequence of positional arguments can be provided (in addition to any positional arguments already accepted by other parameters). Such a parameter can be defined by prepending the parameter name with *, for example args in the following: def func(*args, **kwargs): ...

A clear explanation of variable length arguments with some examples to try can be found at Geeks for Geeks.