Kwargs Vs Args
args
def func1(*args):
return args
func1(1,2,3) # (1,2,3) as tuple
kwargs
def func1(**args):
return args
func1(one=1, two=2) # {'one': 1, 'two': 2} as dict
def func1(*args):
return args
func1(1,2,3) # (1,2,3) as tuple
def func1(**args):
return args
func1(one=1, two=2) # {'one': 1, 'two': 2} as dict