Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

How to Empty a Set in Python Using the clear() Method

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

nameSet.clear()

print(nameSet)
# set()
Source by www.freecodecamp.org #
 
PREVIOUS NEXT
Tagged: #How #Empty #Set #Python #Using #Method
ADD COMMENT
Topic
Name
5+9 =