Sorry woooee the title is misunderstanding. Just need to pass a string through does not have to be a list. Here is my first attempt. Can not be done since self.astr becomes a type error in line 16 I think.
@wooee is keeping the problem you have in (most recent) line 10, which will return just a single character as the second part of the return duple.
The issue is whether class Sentence is more about the full sentence as a string, or more about the list of words in the sentence. Depending on the answer to this question, you will have two ways of working:
Sentence is a string: Constructor is as written above, there is more work done in getfirstword and getallword (see line 14 above)
Sentence is a list: Constructor body becomes self.astr_list = self.setword(astr) the method setword gets a body that is self.astr_list = astr.split() and the methods getfirstword and getallword can just look directly at the list without needing more work. If you need the full sentence you just use ' '.join(self.astr_list which is simplistic if the original sentence had adjacent white spaces (not likely but possible).
P.S. What happens if the sentence has punctuation. For instance if the initial sentence is "We have three colors: red, blue, and chartreuse." Does the sentence have a 'word' that is "colors:" or should it be "colors"? (and similarly for each of the color names).
Dim Adapter As New OleDbDataAdapter
Dim Command As New OleDbCommand
Dim xFrom As String = dtpFrom.Value.ToString.Substring(0, dtpFrom.Value.ToString.IndexOf(" "))
Dim xTo As String = dtpTo.Value.ToString.Substring(0, dtpTo.Value.ToString.IndexOf(" "))
sqlQuery = MainQuery ...