← Back to challenges

Remove the Last Vowel

PythonHardformattingstrings

Instructions

Write a function that removes the last vowel in each word in a sentence.

Examples

remove_last_vowel("Those who dare to fail miserably can achieve greatly.")
➞ "Thos wh dar t fal miserbly cn achiev gretly."

remove_last_vowel("Love is a serious mental disease.")
➞ "Lov s  serios mentl diseas"

remove_last_vowel("Get busy living or get busy dying.")
➞ "Gt bsy livng r gt bsy dyng"

Notes

Vowels are: a, e, i, o, u (both upper and lowercase).

python3
Loading editor…
to run
Walks through the solution with reasoning and edge cases.