What is *kwargs and **kwargs?
Answer / Ashutosh Gusain
*kwargs allows you to pass any number of keyword arguments as a tuple, while **kwargs allows you to pass any number of keyword arguments as a dictionary.nnFor example:n```ndef func(*args):n print(args)nndict = {'a': 1, 'b': 2}nfunc(*dict)nfunc(**dict) # prints (1, 2)n```
| Is This Answer Correct ? | 0 Yes | 0 No |
What does the __ init__ function do in python?
What is head and tail method for data frames in pandas ?
Can I learn python in a month?
What does isalpha do in python?
What is pyunit in python?
What are assignment operators in python?
Explain the use of decorators?
What does the meaning of slicing in python?
How do I sort alphabetically in python?
Why and when do you use generators in python?
Is python faster than python2?
Why does delegation performed in Python?