.remove(x)
This operation removes element from the set.If element does not exist, it raises a KeyError.The .remove(x) operation returns None.
KeyError
None
If we want to add a single element to an existing set, we can use the .add() operation.It adds the element to the set and returns ‘None'.
Example
>>> s = set('HackerRank')>>> s.add('H')>>> print sset(['a', 'c', 'e', 'H', 'k'…
>>> s = set('HackerRank')>>> s.add('H')>>> print sset(['a', 'c', 'e', 'H', 'k'