def average2(*args):
listofvalues = []
for item in args:
listofvalues.append(item)
return sum(listofvalues) / len(listofvalues)
# to pass unlimited parameters add one astors
# this method is for positional arguments
def add(*numbers):
total = 1
for number in numbers:
total += number
return total
print(add(1, 2, 3, 4, 5)) # add as many as you want
# Output >>> 16