Skip to content

Instantly share code, notes, and snippets.

@codecademydev
Created October 8, 2018 07:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codecademydev/13a3b236d04e969572cdb911c0b58fb9 to your computer and use it in GitHub Desktop.
Save codecademydev/13a3b236d04e969572cdb911c0b58fb9 to your computer and use it in GitHub Desktop.
Codecademy export
def anti_vowel(string):
count = 0
vowels = ["A", "E", "I", "O", "U", "a", "e", "i", "o", "u"]
spaces = list(string)
newlist = []
while count <= len(spaces)-1:
letter = spaces[count]
count +=1
if letter not in vowels:
newlist.append(letter)
line = "".join(newlist)
print line
anti_vowel("hello")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment