Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
1, 2 or 3 solution in Clear category for Bird Language by lxf42
from string import ascii_lowercase
vowels = 'aeiouy'
consonants = [x for x in ascii_lowercase if x not in vowels]
def translate(text: str) -> str:
i = 0
res = ''
while i < len(text):
res += text[i]
if text[i] in consonants:
i += 2
elif text[i] in vowels:
i += 3
else:
i += 1
return res
Feb. 24, 2022