I have a list with sentences in Python:
list1 = ["This is the first sentence", "This is the second", "This is the third"]
I tried using split(" "):
sth = []
for i in list1:
sth.append(i.split(" "))
But this way I get a 2D array, which contains regular lists from the sentences with their words, so something like this:
[["This", "is", "the", "first", "sentence"], ["This", "is", "the", "second"], ["This", "is", "the", "third"]]
I would like the outcome to be a regular list, this way:
["This", "is", "the", "first", "sentence", "This", "is", "the", "second", "This", "is", "the", "third"]
How can I achieve this?