In [2]:
'liupengyuan'.endswith('n')


Out[2]:
True

In [12]:
print('请输入一个英文名词的单数形式:')
n=str(input())
if n.endswith('s')or n.endswith('sh')or n.endswith('x')or n.endswith('ch'):
    print(n+'es')
elif n.endswith('f'):
    print('改f或fe为v加es')
elif n.endswith('fe'):
    print('改f或fe为v加es')
elif n.endswith('y'):
    print('改y为i加es')
else:
    print(n+'s')


请输入一个英文名词的单数形式:
fox
foxes