Sets: .discard vs .remove

Learning about sets this week! I’m wondering when you might use .remove as opposed to .discard. From my understanding, the only difference is that .remove will raise an exception if an element that you’re trying to remove is not in the set. Presumably, wouldn’t you first want to search through a set to locate something prior to removing it?

if "word" in setName :
setName.discard("word")