Two ways to remove elements:
colors = {"red", "green", "blue"}
colors.remove("red") # Removes "red"
colors.discard("green") # Removes "green"
The difference? remove() raises an error if the element doesn't exist:
colors.remove("purple") # KeyError: 'purple'
colors.discard("purple") # No error - does nothing
Use remove() when missing elements indicate a bug. Use discard() when you don't care if the element was there.
pop() removes and returns an arbitrary element. clear() removes everything.