Asked By – Thanx
How do I split a sentence and store each word in a list? For example, given a string like
"these are words", how do I get a list like
["these", "are", "words"]?
Now we will see solution for issue: How do I split a string into a list of words?
Given a string
sentence, this stores each word in a list called
words = sentence.split()