Python名词奇数变换为复数函数

Python名词单数变换为复数函数
def plural(word):
    if word.endswith('y'):
        return word[:-1]+'ies'
    elif word[-1] in 'sx' or word[-2:] in ['sh','ch']:
        return word+'es'
    elif word.endwith('an'):
        return word[-2:]+'en'
    else:
        return word+'s'