python remove item by set code example
Example 1: remove an item from a set python
# it doesn't raise error if element doesn't exits in set
thisset = {1, 2,3}
thisset.discard(3)
print(thisset)
Example 2: setremove
set.remove(element)
# it doesn't raise error if element doesn't exits in set
thisset = {1, 2,3}
thisset.discard(3)
print(thisset)
set.remove(element)