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

By ayush goel in 22 Sep 2023 | 04:07 pm
ayush goel

ayush goel

Student
Posts: 346
Member since: 21 Sep 2023

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

22 Sep 2023 | 04:07 pm
0 Likes
divas goyal

divas goyal

Student
Posts: 453
Member since: 22 Sep 2023
  • *args and **kwargs are used in function definitions to accept a variable number of positional and keyword arguments, respectively.
  • *args collects additional positional arguments as a tuple.
  • **kwargs collects additional keyword arguments as a dictionary.
22 Sep 2023 | 06:55 pm
0 Likes

Report

Please describe about the report short and clearly.