Micron Technology interview question

Python Program to create a sub-dictionary containing all keys from dictionary list