Jan-01-2018, 08:16 AM
Hi,
using codecademy for Python learning.
In one of the exercises, were asked to write a function deleting all vowels from a string (upper and lower).
Tried the following, didn't work. Do I misinterpret the replace function?
using codecademy for Python learning.
In one of the exercises, were asked to write a function deleting all vowels from a string (upper and lower).
Tried the following, didn't work. Do I misinterpret the replace function?
def anti_vowel (text): new = text.lower() for l in new: if l=="a" or l=="u" or l=="e" or l=="i" or l=="o": text.replace(l,"") return text