Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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)
 
PREVIOUS NEXT
Tagged: #remove #item #set #python
ADD COMMENT
Topic
Name
9+8 =