def sum(lst, var=0): """Returns the sum of the list usng recursion.""" if len(lst) == 0: return var #base case return sum(lst[2:], var + lst[0])
def sum(lst, var=0): """Returns the sum of the list usng recursion.""" if len(lst) == 0: return var #base case return sum(lst[2:], var + lst[0])