
Nima M. answered 11/16/19
Python / Java: Object-oriented design, algorithm, data structure
*args is used when you define a method without explicitly declaring the arguments that it is supposed to receive. It is very useful when you don't know how many arguments is supposed to be passed to the function and you want to make your function flexible with any number of arguments with any name and type.
however, **kwargs is used when you have a set of expected arguments and you know how each argument must be handle is exploited in your method, but you still want to keep your function flexible to be called with any arbitrary subset of those arguments.