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

0

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)
Posted by: Guest on January-17-2022

Code answers related to "how to make it so we can give unlimited parameters in python function"

Python Answers by Framework

Browse Popular Code Answers by Language