DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
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
COMMENT
Name
4+2 =
Submit