New course! Every coder should learn Generative AI!
Try a free lesson0
how can we remove duplicate element from the given input string using python ?
str= " abcfghjjkkknbbbvvcccggaassdccvghhjjkknnllpkhhgvc"
2 Answers
+ 2
"".join(sorted(set(str)))
remove sorted if you dont need them in alphabetical order