I have a list(lets call it "list") of 5 elements:
['sympathize.', 'sufficient.', 'delightful.', 'contrasted.', 'unsatiable']
I would like to remove vowels ( vowels = ('a', 'e', 'i', 'o', 'u')
) from every item of the list and and the final result should be this
The list without vowels:
['sympthz.', 'sffcnt.', 'dlghtfl.', 'cntrstd.', 'nstbl']
Any ideas? Thanks in advance.
My code:
list = ['sympathize.', 'sufficient.', 'delightful.', 'contrasted.','unsatiable']
vowels = ('a', 'e', 'i', 'o', 'u')
for x in list.lower():
if x in vowels:
words = list.replace(x,"")
Output :
AttributeError: 'list' object has no attribute 'lower'