You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We create a set of the lowercase words for each sentence, which will remove duplicates. Then Python offers the & operator on sets to do the intersection, which will keep the words that are in both sets. We return the length of the set that has the words shared by both sentences.