INTERSECTION¶
Description¶
The INTERSECTION function takes two lists and returns a new list containing only the elements that appear in both lists. Elements present in only one of the two lists are excluded from the result.
Syntax¶
Returns: A list of elements that exist in both list_a and list_b.
Example¶
This returns the countries the person has both lived in and holds a nationality for. For example, if a person has lived in Germany, Switzerland, and Italy, but only holds German nationality, the result would be [Germany].