Hello Stackoverflow people,
I have a nested dictionary with lists as values and I want to create a dict where all the list entries get their corresponding key as value.<
assuming your key: value dictionary contains list as a value and using dict comprehension. Using a second loop to iterate over the list present in original dictionary.
key: value
{item: key for key, value in dict1.items() for item in value}