Choose all the vowels

Report a typo

You are given two lists: letters contains the letters of the Latin alphabet and vowels contains only the vowels ['a', 'e', 'i', 'u', 'o'].

Define a function choose_vowels() that, given the list letters, would return only those letters that are vowels. You do NOT need to call the function or take any input.

Sample of the list letters:

['p', 'r', 'o', 'g', 'r', 'a', 'm', 'm', 'i', 'n', 'g', 'l', 'a', 'n', 'g', 'u', 'a', 'g', 'e']

Sample output:

['o', 'a', 'i', 'a', 'u', 'a', 'e']

Write a program in Python 3
def choose_vowels(letters):
vowels = ['a', 'e', 'i', 'u', 'o']
...
___

Create a free account to access the full topic