Junior — Middle+
Flattening a Deeply Nested Dictionary into a Single-Level Mapping
livecode
Task condition
Create a function that takes a dictionary of arbitrary depth and returns a set of key-value pairs, where each key is formed by concatenating all parent keys.
Example input data: {'a': 4, 'b': {'x': 3}, 'c': {'d': 5, 'e': {'f': 2}}, 'g': 'y'}