Learn Python - args and kwargs

preview_player
Показать описание
There are many situations where you would like to have any number of arguments. For example, let's say you would like to have a sum function that can be called on as many arguments as you can pass in the function. In those cases, args comes to rescue in Python. Python has this asterisk symbol that converts combination of arguments into a single collection. Then we can iterate through this collection and work on them.

Similarly, we can parse each argument in the form of key-value pairs using kwargs. This also comes in handy when you want to have flexibility of arguments. Learn how to use them in this video tutorial.

#Python #LearnProgramming

If you like our content, click on *SUBSCRIBE* button and click on Bell icon to receive latest and greatest updates of my video lessons.

Follow us on Facebook, Twitter, Instagram

Рекомендации по теме
visit shbcf.ru