Editor

Text Without Vowels

#521 · Strings · Beginner · 25 XP · about 3 min

Old text messages saved space by leaving the vowels out: "see you later" became "s y ltr". Write drop_vowels(text) that returns text with every vowel removed. The vowels are a, e, i, o and u, in upper or lower case.

Everything else stays exactly as it was and in the same order: consonants (y included), spaces, digits and punctuation.

Examples

drop_vowels('Hello World')          # returns 'Hll Wrld'
drop_vowels('Programming is fun!')  # returns 'Prgrmmng s fn!'
drop_vowels('AEIOU')                # returns ''

Fastest solvers

Leaderboard

First solves only, ranked by stars and then time.