Here is the code I have:
import string # to import the alphabet <-'abcdefghijklmnopqrstuvwxyz'
alpha = string.lowercase
vowels = "aeiou"
alpha = alpha.strip(vowels)
sentence = "methinks it is like a weasel"
words = sentence.split(" ")
characters = list(sentence)
words
characters
alpha
vowels
when I print I get this:
['methinks', 'it', 'is', 'like', 'a', 'weasel']
['m', 'e', 't', 'h', 'i', 'n', 'k', 's', ' ', 'i', 't', ' ', 'i', 's', ' ', 'l', 'i', 'k', 'e', ' ', 'a', ' ', 'w', 'e', 'a', 's', 'e', 'l']
'bcdefghijklmnopqrstuvwxyz'
'aeiou'
I would like it to remove all vowels from the alphabet, but thus far it is only removing the a (the leading coefficient).