Python args and kwargs: Demystified
Rich Bibby
12:24
Description
Sometimes, when you look at a function definition in Python, you might see that it takes two strange arguments: *args and **kwargs. If you’ve ever wondered what these peculiar variables are, or why your IDE defines them in main(), then this course is for you! You’ll learn how to use args and kwargs in Python to add more flexibility to your functions.
By the end of the course, you’ll know:
This course assumes that you already know how to define Python functions and work with lists and dictionaries.
What You'll Learn?
- What
*args
and**kwargs
actually mean - How to use
*args
and**kwargs
in function definitions - How to use a single asterisk (
*
) to unpack iterables - How to use two asterisks (
**
) to unpack dictionaries
More details
User Reviews
Rating
Rich Bibby
Instructor's CoursesRich is an avid Pythonista and a video instructor at Real Python.
He is also a Network Engineer using Python to automate the management of a large network infrastructure.
He lives in Dubai, UAE, with his wife and daughter plus a Miniature Schnauzer.

Real Python
View courses Real Python- language english
- Training sessions 6
- duration 12:24
- Release Date 2023/01/05