Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Uncategorized category for Bird Language by coells
translate=lambda s:s and s[0]+translate(s[1+(s[0]in'aeiouy')+(s[0]!=' '):])
if __name__ == '__main__':
#These "asserts" using only for self-checking and not necessary for auto-testing
assert translate("hieeelalaooo") == "hello", "Hi!"
assert translate("hoooowe yyyooouuu duoooiiine") == "how you doin", "Joey?"
assert translate("aaa bo cy da eee fe") == "a b c d e f", "Alphabet"
assert translate("sooooso aaaaaaaaa") == "sos aaa", "Mayday, mayday"
June 26, 2014
Comments: