Safely extract values from nested dictionaries using a dotted path and a default fallback.
Constraints
Example
>>> nested_get({'a': {'b': {'c': 42}}}, 'a.b.c')
42
>>> nested_get({'a': {'b': {'c': 42}}}, 'a.b.x')
None
>>> nested_get({'a': {'b': 1}}, 'a.b', 'missing')
1
>>> nested_get({}, '') # returns {} (the data itself)
Recent Submissions
No submissions yet — hit Run Tests to try!
Hints