Loading...
Unflatten Keys
A medium Python interview practice problem on DataDriven. Write and execute real python code with instant grading.
- Domain
- Python
- Difficulty
- medium
Problem
Config files arrive as flat dicts with dot-notation keys like 'database.host.port' and need to be expanded before use. Convert the flat dict into a nested dict structure where each dot segment becomes a level of nesting.
Practice This Problem
Solve this Python problem with real code execution. DataDriven runs your Python code in a sandboxed Docker environment and grades it instantly.