1.

Which of the talowing spent there Which of the following special character is used to define variable lengtharguments?(A) &(B) $(D) #(C) *​

Answer»

(C) *Explanation:In python, * is used to SEND the variable length ARGUMENT list ( i.e., no.of arguments intake at a time ) to a function.Check the following attachment for the detailed explanation:To the function x, we passed 5 actual PARAMETERS 1,2,3,4,5; where in the definition, FORMALLY, we passed a, *b as parameters.In such case, a takes one parameter (the first one), where *b takes in all the remaining parameters as tuple. so, a=1 and b=(2,3,4,5)Note: Variable length parameter should be passed as the LAST formal argument.



Discussion

No Comment Found

Related InterviewSolutions