Q11Numerical4 Marks13 Apr 2025
Consider the following Python code snippet:
What is the output of the program?
```
def recursive_sum(lst):
if not lst:
return 0
if len(lst) == 1:
return lst[0]
return lst[0] + recursive_sum(lst[1:-1]) + lst[-1]
print(recursive_sum([4, 5, 6, 7, 8, 9]))
```
Press Enter to check.