Code: Select all
first_set_of_words = set((red, building, brown, house, black, jacket))
second_set_of_words = set((red, house, yellow, bee, horse, jacket))
intersection_of_the_two_sets_of_words = first_set_of_words.intersection(second_set_of_words)
# Meaning: The words found in both first_set_of_words and second_set_of_words.
print(intersection_of_the_two_sets_of_words)
# {'red', 'house', 'jacket'} will be displayed
