Klaviyo Interview Question

I was asked to flatten a dictionary