DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
How to Remove Items in a Set in Python Using the discard() Method
nameSet = {"John", "Jane", "Doe"} nameSet.discard("John") print(nameSet) # {'Doe', 'Jane'}
Source by www.freecodecamp.org #
PREVIOUS
NEXT
Tagged:
#How
#Remove
#Items
#Set
#Python
#Using
#Method
ADD COMMENT
Topic
COMMENT
Name
8+5 =
Submit