The in operator checks if an element exists in a set:
colors = {"red", "green", "blue"}
print("red" in colors) # True
print("yellow" in colors) # False
print("purple" not in colors) # True
Here's the superpower of sets: membership testing is time on average. For a list, Python checks every element in time. For a set, Python uses hashing to jump directly to the answer.
With a million elements, checking x in my_list might scan all million. Checking x in my_set is nearly instant.