+ 1
what are *args and **kwargs in python? How to use them ?
4 odpowiedzi
0
In simple terms, *args is used to represent a list of values. On the other hand **args is used to represent something like a dictionary which holds key value pairs.
0
line 32 to 56
https://code.sololearn.com/cTiay1gR16w3/?ref=app
0
In Python, the single-asterisk form of *args can be used as a parameter to send a non-keyworded variable-length argument list to functions and the double asterisk form of **kwargs is used to pass a keyworded, variable-length argument dictionary to a function.
https://code.sololearn.com/cmliS71s7Pys/?ref=app