pyassistant

Next Vowel Replacement (wraparound, preserve case)

Replace each vowel in a string with the next vowel in the sequence a -> e -> i -> o -> u -> a. Preserve the original letter case (uppercase maps to the corresponding uppercase vowel). Non-vowel characters should remain unchanged. Return the transformed string.

Example:

Input:
('Hello World!',)
Output:
'Hillu Wurld!'

Make sure you return your solution, don't print!

AI

Bot

Trying to solve my challenge? Ask if you must, or press the purple button so I can analyze your code.