Declaration: Ive searched high and low on SOF for an answer but I doesnt click with my problem.
attempting to create a condition that if the last two elements of an input argument = 'sh' or 'ch', append 'es' to the end.
elif word [-2:-1].lower() == 's' + 'h' or (word [-2:-1].lower() == 'c' + 'h'):
word = word + 'es'
dictionary ['plural'] = word; dictionary ['status'] = 'success' #dictionary format
the output im getting at the moment :
pouch --> {'plural': 'pouchs', 'status': 'success'}
This is taking place (i think) since I have a prior condition that any input argument that does not come from my file (containing a list of strings) should be pluralized with the letter 's'. This would be my last condition in my program:
elif word not in proper_nouns:
word = word + 's'
dictionary ['plural'] = word; dictionary ['status'] = 'success'