**kwargs in python

**kwargs is used when we want to pass variable length keyworded arguments to a function. A keyworded arguments will have a key value pair like name=”John” or {“name”:”John”}. Let us look into **kwargs with two examples. In the first example we will pass keyworded arguments of variable length. In the next example we will pass […]

Read More

*args in python

Whenever there is any function that accepts arguments, the number of arguments passed while calling the function should always match the number of arguments in the function. If we violate this the code throws an error. Let us look at this with a simple example. Consider the following code. This will print 10 as the […]

Read More