0

how can we remove duplicate element from the given input string using python ?

str= " abcfghjjkkknbbbvvcccggaassdccvghhjjkknnllpkhhgvc"

10th Apr 2018, 6:43 PM
Ankit
Ankit - avatar
2 Respostas
+ 2
"".join(sorted(set(str))) remove sorted if you dont need them in alphabetical order
10th Apr 2018, 6:58 PM
Markus Kaleton
Markus Kaleton - avatar