convert string to word index python code example
Example 1: python split sentence into words
sentence = 'Hello world a b c'
split_sentence = sentence.split(' ')
print(split_sentence)
Example 2: python how to turn a word into a list
wordString = "foobar"
list(wordString)
>>> ['f', 'o', 'o', 'b', 'a', 'r']