Class 12th CBSE CS
Write a program to count the number of vowels present in a text file.
Solution: –
fin=open("D:\\python programs\\MyBook.txt",'r') str=fin.read( ) count=0 for i in str: if i=='a' or i=='e' or i=='i' or i=='o' or i=='u': count=count+1 print(count)
Fun & Easy to follow
Works on all devices
Your own Pace
Super Affordable
Popular Videos
UX for Teams
Learn the basics and a bit beyond to improve your backend dev skills.

Chris Matthews
Designer
SEO & Instagram
Learn the basics and a bit beyond to improve your backend dev skills.

Chris Matthews
Designer