Solution:
The answer is: YES! You can write a code that read vowels from the input text and determines the end of the line.
vowels = {'A','E','I','O','U','a','e','i','o','u'}
with open('my_file.txt') as f:
vow = sum(ch in vowels for line in f for ch in line.strip())
while True:
line = f.readline().strip()
if line == '':
break
Here, we defined our vowels and checked it into our input, and then checked through a While-loop if it reaches the end of the line or not!
Hence, (‘ ‘) define an empty string or (EOL) and of the line.
Thanks.