Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

count unique values in python

words = ['a', 'b', 'c', 'a']
unique_words = set(words)             # == set(['a', 'b', 'c'])
unique_word_count = len(unique_words) # == 3
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #count #unique #values #python
ADD COMMENT
Topic
Name
6+5 =