I have two dictionaries. For example:
dict_a = {'verbs': ['run', 'go', 'eat'], 'nouns':['dog', 'cat', 'bear']}
dict_b = {'verbs': ['jump'], 'nouns': ['human']}
I have written a function that can take all the items in each list from dict_b and place them into their proper spot in dict_a. (I.e., dict_b ‘verbs’ will go into dict_a ‘verbs’, etc etc…)
However I also need to write a function to take out those same words from dict_b if they are in dict_a, but I’m kind of lost. I’ve written a few things, but none of them worked. I’m not expecting anyone to do the work for me, but if someone has a hint give… That’d be awesome.
1 Answer