How to use *ARGS and **KWARGS in Python

preview_player
Показать описание
They look funny, but can quickly become your best friends! Functions are everywhere in Python and can do many things. With the right parameters they can do even more! In this video you learn how args and kwargs make your function arguments more flexible.

Sie sehen seltsam aus, können aber deine besten Freunde werden.
Funktionen sind Teil unserer täglichen Arbeit und können viel leisten. Mit den richtigen Parametern können sie aber noch mehr! Du wirst flexibler mit Argumenten umgehen können und damit deine Ziele eleganter erreichen.

C H A P T E R S
0:28 Args to get one or more arguments as a Tuple
2:18 Kwargs to get arguments as a Dictionary

M Y O N L I N E T R A I N I N G

#pythonforeveryone #programming #python
Рекомендации по теме
Комментарии
Автор

Honestly I was always frustrated when I saw these in some of the Django projects. Knowing that it's a very simple concept, I'm laughing at myself, LOL...Thanks for the explanation btw, very clear and concise!!

gokulraam
Автор

It is super!!! Now I know what is that. Just two question. In *args, why you input two zeros and it returns one? And, in **kwargs, why you need " if fill in kwargs"?? Output seems to be identical. I'm just confused...

kyrylolyskov
visit shbcf.ru