How to use variable-length arguments in a function in Python?
When I am using the following code
def multiply(*args):
y = 1
for num in args:
y *= num
print(y)
multiply(3, 7)
multiply(9, 8)
multiply(3, 4, 7)
multiply(5, 6, 10, 8)
I am able to use variable-length arguments in a python function? How is it possible?