How to Pass Multiple Arguments into Function in Python

Hello everyone, In this post, you will learn, How to Pass Multiple Arguments into Function in Python. The example has been tested and shared in the post.

Example Programm

# defining a function
def add(*numbers):
    sum = 0
    for number in numbers:
        sum += number
    return sum

# calling the function
print("Result : %s" % (add(10, 20, 30, 40)))

Output

Result : 100