Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

multiple arguments in python

def calculateTotalSum(*args):
  totalSum = 0
  for number in args:
    totalSum += number
  print(totalSum)

calculateTotalSum(15, 3, 7, 89, 2)
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #multiple #arguments #python
ADD COMMENT
Topic
Name
9+3 =