Unpacking Arguments

Learn how can we enhance function calls by unpacking lists and dictionaries, optimizing argument provision, and dictionary merging.

There’s one more nifty trick involving positional and keyword parameters. We’ve used it in some of our previous examples. Now let’s have a look at its explanation.


Given a list or dictionary of values, we can pass a sequence of values into a function as if they were normal positional or keyword arguments. Have a look at this code:

Get hands-on with 1200+ tech skills courses.