Calmcode - args kwargs: numbers

How to pass multiple arguments to a single python function.

1 2 3 4 5 6 7

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