Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Here's Python 3:

    from unicodedata import name as ᚾᚮᛗᚨ
    ᛊᛈᛚᛁᛏ = str.split

    def ᚢᚾᛒᛂᚺᚱᛂᚮᛊᚨᚾ(ᚥᚮᚱᛑ):
        ᚮᚢᛏ = []
        for ᛍ in ᚥᚮᚱᛑ:
            if 'ᚠ' <= ᛍ <= 'ᛪ':
                ᚾ = ᛊᛈᛚᛁᛏ(ᚾᚮᛗᚨ(ᛍ))[-1]
                ᚮᚢᛏ += [ᚾ]
            else:
                ᚮᚢᛏ += [ᛍ]
        return ᚮᚢᛏ
Apologies if my Old English is crappy, I used Wiktionary.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: