- 1
Remove_duplicates function (in Python) challenge.
Write a function called remove_duplicates which will take one argument called string. This string input will only have characters between a-z. The function should remove all repeated characters in the string and return a tuple with two values: A new string with only unique, sorted characters. The total number of duplicates dropped. For example: remove_duplicates('aaabbbac') => ('abc', 5) remove_duplicates('a') => ('a', 0) remove_duplicates('thelexash') => ('aehlstx', 2)
4 Respostas
+ 5
Essentially two lines:
https://code.sololearn.com/cTQ4xB61Txt9/?ref=app
+ 2
https://code.sololearn.com/cwmHiKzwYPzh/?ref=app
0
@Tobi you are very correct