im making a script in python, and i want to know how to count the types of letters in a string. For example, if my string is abcc, it should return 3. because theres a, b, and c. if its accc, it should return 2. if its abcdeff it should return 6. So, how do i do this?
Asked
Active
Viewed 78 times
0
apchrkey
- 13
- 2
-
2So, `len(set(str))`? – cs95 Nov 22 '17 at 18:12
-
At least make an *effort* to do your own homework. What good is that degree you didn't earn if you don't know enough to keep the job it gets you? – Ken White Nov 22 '17 at 18:20