Difference between *args and ** kwargs

*args allows us to pass a variable number of non-keyword arguments to a Python function. In the function, we should use an asterisk (* ) before the parameter name to pass a variable number of arguments.

**kwargs allows us to pass a variable number of keyword arguments to a Python function. In the function, we use the double-asterisk (** ) before the parameter name to denote this type of argument.

2 Likes

@lakshmisainath007

Nice explanation, keep the pace up.

@lakshmisainath007 Explained well