PY
py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
v =['a','e','i','o','u']
f = open("example.txt","w")
str = "raj soni is a good boy and he loves coding"
f.write(str)
f.close()
f = open("example.txt","r")
d = f.readlines()
for lines in d:
count = 0
for i in len(lines):
if i in v :
count = count + 1
else:
print("ndjseh")
print(trhe no. of vowel in file is => ",count)
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run