2 0
Read Time:12 Second
x = open(r"exp.txt",'r')
d = x.read()
dwl = d.split()
c = 0
for i in dwl:
    if i[0] in 'aeiouAEIOU':
        c = c + 1
        print(i)
print("total words that start with vowel : ",c)
x.close()
See also  Reading and Writing CSV Files in Python
See also  working with functions important programs part 1
Happy
Happy
%
Sad
Sad
%
Excited
Excited
%
Sleepy
Sleepy
%
Angry
Angry
%
Surprise
Surprise
%