Two clubs are looking for activities their members can do together. An intersection contains only values in both groups.
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"}) # TrueA pair of membership checks answers the question for one name. Applying & to the two sets finds every match at once.
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.