You are probably looking for Arbitrary Argument List.
However, you are probably doing more work than you need to and also I am not entirely sure what you are exactly trying to do (or what you mean by efficient algorithm), but the sum
builtin function already does what you needed, you just need to read the documentation on what it actually expects in its arguments.
>>> sum([1,2,3])
6
>>> sum([1,2,3,4,5,6])
21
Or heck, if you want to go without a list or tuple (actually, arguments are a list already so you are just using unnecessary syntactic sugar) you can just do this then.
def add(*numbers):
return sum(numbers)
Just think a little and you can put together the above function.