Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to make it so we can give unlimited parameters in python function

def average2(*args):
    listofvalues = []
    for item in args:
        listofvalues.append(item)
    return sum(listofvalues) / len(listofvalues)
 
PREVIOUS NEXT
Tagged: #give #unlimited #parameters #python #function
ADD COMMENT
Topic
Name
8+4 =