Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Write a function that takes one string, text, as input and returns the text with all of the vowels removed.
- def anti_vowel(text):
- res = []
- text = list(text) # make the text and res in the form of a list
- for letter in text:
- if letter not in "aeiouAEIOU":
- res.append(letter) # then can append each letter into the list
- return "".join(res)
- print anti_vowel("Hey You!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement