scamp.utilities.sum_nested_list

scamp.utilities.sum_nested_list(l: List)[source]

Sums up all of the values within a nested list. For instance sum_nested_list([6, [4, 2], [[-7]]]) will return 5

Parameters

l – the input list

Returns

sum of the l’s nested values