What does this stuff mean: *args, **kwargs? And why would we use it? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 5

What does this stuff mean: *args, **kwargs? And why would we use it?

24th May 2023, 4:51 AM
Vaibhav
Vaibhav - avatar
4 Answers
+ 2
Args is just a name: He picks up all the arguments that are vague as list: Example: def p(a, *b) : print (a) print (b) p( 1,2,3,4,4,5,5) Result: 1 (2, 3, 4, 4, 5, 5)
25th May 2023, 3:23 PM
Vuk V
Vuk V - avatar
+ 2
**kvargs It's just a name but it collects data like dict
25th May 2023, 3:24 PM
Vuk V
Vuk V - avatar