Loading...

The Deep Config

A medium Python interview practice problem on DataDriven. Write and execute real python code with instant grading.

Domain
Python
Difficulty
medium
Seniority
senior

Problem

Our deployment system stores configuration as deeply nested dictionaries, but our feature flag service needs flat key-value pairs. Write a function called flatten_config that collapses nested dicts into dot-separated keys - e.g., {'a': {'b': {'c': 3}}} becomes {'a.b.c': 3}.

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.