Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to use an indefinite number of args in python

# use *args to allow user to input as many argumnets as they want
def mean(*args):
  return sum(args)/len(args)
 
PREVIOUS NEXT
Tagged: #indefinite #number #args #python
ADD COMMENT
Topic
Name
8+2 =