What is the difference between kwargs and args?
args is a tuple of anonymous arguments
kwargs is a dictionary of named arguments, it stands for keyword arguments
def func(*args, **kwargs):
print('args: ', args, ' kwargs: ', kwargs)
func('a')
args: ('a',) kwargs: {}
func(a=1,b=2,c=3)
args: () kwargs: {'a':1, 'b':2, 'c':3}
func('x','y',a=1,b=2,c=3)
args: ('x', 'y') kwargs: {'a':1, 'b':2, 'c':3}