Skip to content

Instantly share code, notes, and snippets.

View danieltanfh95's full-sized avatar

Daniel danieltanfh95

View GitHub Profile
@danieltanfh95
danieltanfh95 / mcc_bahasa_f.py
Last active October 6, 2015 13:40
shorter answer for bahasa f
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)))