Codington
0 of 6 problems solved • 0%

Exercise prompt

Find Shared Activities

Two clubs are looking for activities their members can do together. An intersection contains only values in both groups.

Example

Compare the membership of two hiking teams.

valley = {"Bo", "Kim"} summit = {"Kim", "Arun"} print("Kim" in valley and "Kim" in summit) # True print(valley & summit == {"Kim"}) # True

A pair of membership checks answers the question for one name. Applying & to the two sets finds every match at once.

Your task

Return a set of activities that appear on both clubs’ lists. Repeated entries count once and spelling is case sensitive. With no common activities, return an empty set.