I am trying to write a function that takes any number of arguments and then sums them using recursion ( I am not using the built in sum function. I am assuming arguments will be int. )
But my base case doesn't stop it from recursing! Any hints?
def sum_all(*args):
if args == ():
return 0
else:
return args[0] + sum_all(args[1:])