Flatten a Nested Dictionary
Given a nested dictionary, flatten it into a single-level dictionary where nested keys are combined into one key (e.g., joined by a separator such as '.') pointing to the innermost value. For example, {"a": {"b": {"c": 1}}} becomes {"a.b.c": 1}.
Asked at:
Meta
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Early August, 2025
Meta
Senior
Hello Interview Premium
Your account is free and you can post anonymously if you choose.