Python Programming - Functions - Discussion

Discussion Forum : Functions - General Questions (Q.No. 43)
43.
What is the purpose of the *args and **kwargs parameters in a function definition?
To specify required arguments.
To accept a variable number of positional and keyword arguments.
To indicate optional parameters.
To define default parameter values.
Answer: Option
Explanation:
*args is used to pass a variable number of positional arguments, and **kwargs is used to pass a variable number of keyword arguments to a function.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.