args kwargs logo args kwargs: numbers

1 2 3 4 5 6 7
Notes

You can pass multiple arguments to a function via the star sytax like *numbers.

The function that can handle many numbers is shown below.

def multiply(*numbers):
    result = 1
    for n in numbers:
        result = result * n
    return result