This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| test="cu/a/ca ha/ri i/ni san/gat pa/nas" | |
| def split_words(sentence): | |
| return map(lambda x : x.split("/"), sentence.split()) | |
| def generate_f(syllable): | |
| return syllable+"f"+ (syllable[1:] if syllable[0] not in "aeiou" else syllable) | |
| print(" ".join("".join(map(generate_f, word)) for word in split_words(test))) | |
NewerOlder