blob: 191b90885a4d05680663bef7728fe9a34b1f1841 (
plain)
1
2
3
4
5
6
7
8
|
def recursive_list_sum(data_list):
total = 0
for element in data_list:
if type(element) == type([]):
total = total + recursive_list_sum(element)
else:
total = total + element
return total
|