+ 2

How to find character used in a string?

input-aabcds output-[a,b,c,d,s]

25th Jan 2018, 2:31 PM
Nikhil Kohli
Nikhil Kohli - avatar
3 Answers
25th Jan 2018, 5:15 PM
Lucas Sousa
Lucas Sousa - avatar
+ 3
A python version could be like this: s = list(set(input("Give me some text\n"))) s.sort() #if sort is needed print("This is the result: ", s)
25th Jan 2018, 3:57 PM
Paul
Paul - avatar
0
java: string.toCharArray();
25th Jan 2018, 2:51 PM
Jeremy
Jeremy - avatar