Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
1-Line solution in Creative category for Bird Language by hrvoje
# migrated from python 2.7
import re
def translation(phrase):
return re.sub(r'([aeiouy]){3}', r'\1', re.sub(r'((?![aeiouy])[a-z])([aeiouy])', r'\1',phrase))
if __name__ == '__main__':
#These "asserts" using only for self-checking and not necessary for auto-testing
assert translation("hieeelalaooo") == "hello", "Hi!"
assert translation(u) == "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"
June 9, 2015
Comments: