what are *args and **kwargs in python? How to use them ? | Sololearn: Learn to code for FREE!

0

what are *args and **kwargs in python? How to use them ?

6/18/2020 2:47:31 PM

Anvesh

4 Answers

New Answer

0

https://www.google.com/url?sa=t&source=web&rct=j&url=https://realpython.com/python-kwargs-and-args/&ved=2ahUKEwivp7u1z4vqAhVFUt8KHTPfAWwQFjADegQIAxAB&usg=AOvVaw3Z9zXVWUj9yRQbAoPklWYW

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