python count distinct letters

Solutions on MaxInterview for python count distinct letters by the best coders in the world

showing results for - "python count distinct letters"
Mariela
25 Sep 2017
1string = 'aabbcd'
2unique = []
3for char in string[::]:
4    if char not in unique:
5        unique.append(char)
6print(len(unique))
7