I have a list named messages.
messages = ['hey how are you', 'doing good what about you']
My end goal is to run the list against other list of vocabulary, and if each word is in my vocab list, put it in other list. This vocabulary list should look like this:
vocab = ['hey', 'how', 'you']
(Notice 'are' is omitted)
The final list of my formatted data is right now looks like this:
final_list = np.array([['', '', '', ''], ['', '', '', '']])
I want it to look something like this:
final_list = np.array([['hey', 'how', 'you', ''], ['you', '', '', '']])
I have an idea using the for loop and enumerate(), but it's not working well.