← Back to challenges

Words that Start with a Vowel

PythonHardstringsregex

Instructions

Write a function that retrieves all words that begin with a vowel.

Examples

retrieve("A simple life is a happy life for me.") ➞ ["a", "is", "a"]

retrieve("Exercising is a healthy way to burn off energy.")
➞ ["exercising", "is", "a", "off", "energy"]

retrieve("The poor ostrich was ostracized.")
➞ ["ostrich", "ostracized"]

retrieve("")
➞ []

Notes

  • Make all words lower case in the output.
  • Retrieve the words in the order they appear in the sentence.
python3
Loading editor…
to run
Walks through the solution with reasoning and edge cases.
Next: Replace Vowel With Another Character