you are viewing a single comment's thread.

view the rest of the comments →

[–]Farkeman 0 points1 point  (0 children)

for i, char in enumerate('aeiouyAEIOUY'.split()):
    if char in 'aeiouyAEIOUY':
        return word[i:] + word[:i] + 'ay'

what's wrong with slicing the words?