Which Python feature allows functions to accept any number of keyword arguments?

  • **args
  • **arguments
  • **kwargs
  • *arguments
The feature in Python that allows functions to accept any number of keyword arguments is **kwargs. This is often used when you want to pass a variable number of keyword arguments to a function. The double asterisk ** before kwargs allows you to collect keyword arguments into a dictionary within the function.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *