Write a python program to calculate average using python *args ?
Write a python program to calculate average using python *args ?
Write a python program to calculate average using python *args ?
Program
def myfun(*args):
avg1 = sum(args)/len(args)
print("The average is : ",avg1)
if __name__=="__main__":
myfun(12,34,56,78,34)
myfun(12,34,56,78,34,45,87,90)