InterviewSolution
Saved Bookmarks
| 1. |
Write python function which takes a variable number of arguments. |
|
Answer» A FUNCTION that TAKES variable arguments is CALLED a function prototype. Syntax: def function_name(*arg_list)For EXAMPLE: def func(*var): for i in var: print(i)func(1)func(20,1,6)The * in the function argument REPRESENTS variable arguments in the function. |
|