Answers for "python count distinct letters"

0

python count distinct letters

string = 'aabbcd'
unique = []
for char in string[::]:
    if char not in unique:
        unique.append(char)
print(len(unique))
Posted by: Guest on May-03-2021

Python Answers by Framework

Browse Popular Code Answers by Language