the function is that it get a string and it has to give an output of words in that string in a vector or a list format.
What is a "word" for you?
a string of chars what are spaced by a space
Well, by this definition:
fn main() {
let text = "Hello world. What's hanging?";
let words: Vec<_> = text.split_whitespace().collect();
dbg!(words);
}