Your question is Recursion Function Basics. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
A BILL approval policy may contain individual approval thresholds and nested approval groups. Given a nested structure of integers, return the sum of every integer using recursion.
An element is either an integer or a list containing more valid elements. The function must recursively process each nested list and add all integer values.
Implement sum_nested_values(items):
items, a non-empty nested list containing integers or lists of valid nested elements.items.def sum_nested_values(items):