Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python count distinct letters

string = 'aabbcd'
unique = []
for char in string[::]:
    if char not in unique:
        unique.append(char)
print(len(unique))
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #count #distinct #letters
ADD COMMENT
Topic
Name
9+7 =