Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python set remove multiple elements

>>> s = {1, 2, 3, 4, 5}
>>> s.difference_update({1, 2, 3})
>>> s
{4, 5}
>>> s -= {4, 5}
>>> s
set()
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #set #remove #multiple #elements
ADD COMMENT
Topic
Name
4+2 =