Write flatten_dict(d) that turns nested dicts into dotted keys: {"a": {"b": 1}, "c": 2} → {"a.b": 1, "c": 2}. Nesting can be any depth.
flatten_dict({'a': {'b': 1}, 'c': 2})
→ {'a.b': 1, 'c': 2}flatten_dict({})
→ {}Submit runs 4 tests, including hidden edge cases.
Run your code to see the output here.