Answers for "distinct characters in a string python"

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 "distinct characters in a string python"

Python Answers by Framework

Browse Popular Code Answers by Language