#585 · File handling · Intermediate · 60 XP · about 10 min
Write split_by_vowel(source, vowel_file, other_file) that reads the text file source line by line:
a, e, i, o or u, in upper or lower case) is copied into vowel_file.other_file.Copy each line's text as it is and end every copied line with a newline. Replace whatever the two files held before. Return a tuple (vowel_lines, other_lines) with how many lines went into each file.
If food.txt holds:
apple pie Banana split Orange juice cherry
then split_by_vowel('food.txt', 'vowels.txt', 'others.txt') returns (2, 2). vowels.txt holds apple pie and Orange juice, and others.txt holds Banana split and cherry.
A line that is not blank never starts with a space.
First solves only, ranked by stars and then time.