0 votes
in Python by
What does this stuff mean: *args, **kwargs? And why would we use it?

1 Answer

0 votes
by
  • Use *args when we aren't sure how many arguments are going to be passed to a function, or if we want to pass a stored list or tuple of arguments to a function.

  • **kwargs is used when we dont know how many keyword arguments will be passed to a function, or it can be used to pass the values of a dictionary as keyword arguments.

Related questions

0 votes
asked Jan 3 in Python by DavidAnderson
+1 vote
asked Feb 14, 2021 in Python by SakshiSharma
...