Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to pass multiple parameters by 1 arguments in python

def add(*numbers):
    sum = 0
    for x in numbers:
        sum = sum + x
    print(sum)


add(10, 20, 30)
add(10, 20, 30, 40, 50)
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #pass #multiple #parameters #arguments #python
ADD COMMENT
Topic
Name
1+2 =