+ 1
If you don't know the basics of python. You should try one of the python courses here on Sololearn. Please provide your attempt.
29th Oct 2022, 2:17 AM
Chris Coder
Chris Coder - avatar
0
Sophie Daly here is an idea: words =['apple' , 'facetious', 'duck', 'aaeiou', 'uoiea', 'abecidofu'] def is_aeiou(w): if [c for c in w if c in 'aeiou']==['a', 'e', 'i', 'o', 'u']: return True return False for w in words: if is_aeiou(w): print(w) instead of the words list, open a file and read the words. Pass it to the is_aeiou function. I don't know the structure of your file, so you have to figure that out yourself. instead of print, append the filtered word to a list. maybe something like result = [] with open('yourfile') as f: for line in f: for w in line.split(): if is_aeiou(w): result.append(w)
29th Oct 2022, 9:13 AM
Bob_Li
Bob_Li - avatar