Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

How to Add Items to a Set in Python

nameSet = {"John", "Jane", "Doe"}

nameSet.add("Ihechikara")

print(nameSet)
# {'John', 'Ihechikara', 'Doe', 'Jane'}
Source by www.freecodecamp.org #
 
PREVIOUS NEXT
Tagged: #How #Add #Items #Set #Python
ADD COMMENT
Topic
Name
8+5 =