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