Write a python program to create function func1() to accept a variable length of arguments and print their value.
belongs to collection: Python Functions Exercises
All Answers
total answers (1)
belongs to collection: Python Functions Exercises
total answers (1)
Hint:
To accept a variable length of positional arguments, i.e., To create functions that take n number of positional arguments we use
*args
as a parameter. (prefix a parameter name with an asterisk * ).Using this we can pass any number of arguments to this function. Internally all these values are represented in the form of a tuple.
Solution:
need an explanation for this answer? contact us directly to get an explanation for this answer