def count_vowels(path='BOOK.txt'): vowels = ('a', 'e', 'o', 'i', 'u') count = 0 with open(path) as file: for line in file: for char in line: if char in vowels: count += 1 return count
Need a fast expert's response?
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!
Comments