Python *args and kwargs Explained - Beginner Tutorial #12 (with mini project)

8views
00
9:08
T
Taught by Celeste AI - AI Coding Coach
View on YouTube
Description
Learn Python *args and **kwargs in this beginner-friendly tutorial! 📦 In this lesson, you will learn: ✅ *args collects extra positional arguments into a tuple ✅ **kwargs collects keyword arguments into a dictionary ✅ *args with regular parameters ✅ **kwargs with regular parameters ✅ Combining *args and **kwargs in one function ✅ Unpacking a list with * ✅ Unpacking a dict with ** ✅ Forwarding arguments to another function ✅ Mini Project: Event Planner with flexible arguments 🕐 Timestamps: 0:00 - Introduction 0:22 - Args & Kwargs Basics Explained 0:46 - Args & Kwargs Basics Demo 2:46 - Advanced Usage Explained 3:10 - Advanced Usage Demo 5:27 - Mini Project Explained 5:51 - Event Planner Demo 8:11 - Recap 8:46 - End 💻 Source Code: https://github.com/GoCelesteAI/python_args_kwargs 📚 Code from this lesson: # *args collects positional arguments def sum_all(*args): total = 0 for num in args: total += num return total # **kwargs collects keyword arguments def print_info(**kwargs): for key, value in kwargs.items(): print(f" {key}: {value}") # Combining *args and **kwargs def log_event(event, *tags, **details): print(f"Event: {event}") # Unpacking with * and ** numbers = [1, 2, 3] add(*numbers) greet(**config) 🔗 Previous: Lesson 11 - Functions 🔗 Next: Lesson 13 - Lambda Functions #Python #PythonTutorial #LearnPython #Programming #Args #Kwargs #PythonFunctions Tags Python, Python tutorial, Python for beginners, learn Python, args, kwargs, *args, **kwargs, variable arguments, unpacking, forwarding arguments, Python functions, event planner, star args, double star kwargs, Python unpacking, CelesteAI Category Education

Tags

PythonPython tutorialPython for beginnerslearn Pythonargskwargs*args**kwargsvariable argumentsunpackingforwarding argumentsPython functionsevent plannerstar argsdouble star kwargs
Back to tutorials

Duration

9:08

Published

February 8, 2026

Added to Codegiz

March 15, 2026

Open in YouTube