Advertisement
ALENTL

Untitled

Jun 29th, 2022 (edited)
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. def countVowel():
  2. file = open('main.txt')
  3.  
  4. a = file.read()
  5.  
  6. b = a.split()
  7.  
  8. count = 0
  9.  
  10. for k in b:
  11. for a in k:
  12. if a in "aeiouAEIOU":
  13. count = count + 1
  14. print("No of vowels present in", k, ": ",count)
  15. count = 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement