how to get unlimited arguments python code example
Example: unlimited arguments python
def add(*args): # *args takes multiple inputs
return sum(args)
print(add(1,2,3,4,5)) # prints 15
print(add(10, 20, 30)) # prints 60
def add(*args): # *args takes multiple inputs
return sum(args)
print(add(1,2,3,4,5)) # prints 15
print(add(10, 20, 30)) # prints 60