Question: please help me with this question. Problem 22: Write a function called reverse_vowels. This function should reverse the vowels in a string (USER INPUT). Any
please help me with this question.

Problem 22: Write a function called reverse_vowels. This function should reverse the vowels in a string (USER INPUT). Any characters which are not vowels should remain in their original position. You should not consider "y" to be a vowel. Test cases: reverse_vowels("Hello!") # "Holle!" reverse_vowels("Tomatoes") # "Temotaos" reverse_vowels("Reverse Vowels In A String") # "RivArsl Vewols en e Streng" reverse_vowels("aeiou") # "uoiea" reverse_vowels("why try, shy fly?") # "why try, shy fly?"
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
