+ 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.
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)