Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def higher(text):
- text = text.replace(" ", "")
- count = 0
- for char in text:
- current_count = text.count(char)
- if current_count > count:
- count = current_count
- last = char
- return text.replace(last, "")
- print(higher("uk aaaa aaaa eeee iiii eeee iiii ku"))
- print(higher("otro texto"))
- // varias veces el mismo texto
- print(higher(higher("uk aaaa aaaa eeee iiii eeee iiii ku")))
- print(higher(higher(higher("uk aaaa aaaa eeee iiii eeee iiii ku"))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement