JPMorganChase Interview Question

Write a function to flatten a dict