Study
Python · Functions: *args, **kwargs and scope
Variable-length arguments with *args and **kwargs, keyword-only parameters, unpacking at the call site, and LEGB scope.
- *args collects extra positional arguments into a tuple; **kwargs collects extra keyword arguments into a dict.
- Python looks names up in the order Local, Enclosing, Global, Built-in.