Answers for "python get distinct characters in a string"

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

Code answers related to "python get distinct characters in a string"

Python Answers by Framework

Browse Popular Code Answers by Language