Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def remove_duplicates(text):
- unique = ''.join(sorted(set(text)))
- return (unique, len(text) - len(unique))
- print( remove_duplicates("bbbcddcc") )
- # ('bcd', 5)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement