Write functions with a variable number of arguments in Python using *args and **kwargs

·

1 min read

*args collects extra positional arguments as a tuple.

image.png

**kwargs - collects the extra keyword arguments as a dictionary.

image.png