Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python count unique values in list

len(set(["word1", "word1", "word2", "word3"]))
# set is like a list but it removes duplicates
# len counts the number of things inside the set
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #count #unique #values #list
ADD COMMENT
Topic
Name
1+9 =