Your question is Convert Sentence to Word Array. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
A Credit Acceptance application receives a sentence that must be processed as an ordered array of words. Write a function that converts the sentence into a list by splitting on one or more whitespace characters.
Preserve each word's original characters and order. Do not remove or alter punctuation attached to a word. For an empty or whitespace-only sentence, return an empty list.
Implement sentence_to_words(sentence).
sentence, a string containing zero or more characters.def sentence_to_words(sentence):