This problem teaches you string transformation through filtering. You learned to classify characters into categories (vowels vs consonants) and process them differently based on that classification.
Building strings incrementally is a core technique. When you need to construct a new string based on input, create an empty result and append to it piece by piece. This pattern works for many string manipulation problems.
Set membership checking is useful. Storing valid characters in a string or set makes it easy to check if a character belongs. This approach is cleaner than writing long chains of OR conditions.