If I have a dictionary containing 2 or more lists, how can I quickly find shared items between these lists and add these shared items to a list external to the dictionary?
For example:
list1:
- eng;English
- lir;Liberian English
list2:
- eng;English
- bav;Vengo
list3:
- lat;Latin
extList:
- eng;English
This shared item is then removed from the lists inside the dictionary.
I have added list3 to show that a superfluous item may be ignored, and that I have specified 2 or more lists.
Suppose we have a list of lists (or a dictionary, which would add a Key):
You can find items that are present in all lists:
If you want to get strings that are common to just a few lists, you can use:
You can drop the last line if you don’t care how many times each word appears. Note that this will not tell you in which list the word is.