Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Bird Language by yukirin
import re
VOWELS = "aeiouy"
def translation(phrase):
return re.sub(r'([aeiouy])\1{2}', r'\1', re.sub(r'([^aeiouy ])[aeiouy]', r'\1', phrase))
if __name__ == '__main__':
assert translation("hieeelalaooo") == "hello", "Hi!"
assert translation("hoooowe yyyooouuu duoooiiine") == "how you doin", "Joey?"
assert translation("aaa bo cy da eee fe") == "a b c d e f", "Alphabet"
assert translation("sooooso aaaaaaaaa") == "sos aaa", "Mayday, mayday"
April 7, 2015