Variable Number of Arguments (*args/**kwargs) in Functions | Python for Data Science | Anant Agarwal
Автор: Anant Agarwal
Загружено: 2024-05-13
Просмотров: 32
Today's video dives into a powerful concept in Python: variable arguments using asterisks, specifically *args and **kwargs. Imagine a function that can handle an unknown number of arguments, or even arguments with custom names. That's the magic of *args and **kwargs! We'll break down how they work and explore their benefits for writing flexible and reusable Python code.
00:00 - Introduction to Session
00:56 - Types of Variable Length Arguments
01:43 - Benefits of Using Variable Number of Arguments
03:20 - Variable Number of Positional Arguments (*args)
06:02 - When can Positional Arguments Be Useful
09:09 - Variable Number of Keyword Arguments (**kwargs)
13:15 - Quick Recap of *args and **kwargs (and incorrect syntax examples)
16:19 - Having Both Variable Number of Positional and Keyword Arguments
17:13 - Keywords Arguments Should Always Follow Keyword Arguments
18:43 - Closing Notes
Here's the link to Functions in Python - Part 2 as discussed in today's session - https://completedatascience.sharepoin...
Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: