Easy way to break up a sentence?

William wilk-spamout at flibuste.net
Wed Oct 2 15:48:19 CEST 2002

"Ken" <ken at hotmail.com> writes:

> Hi all, I am trying to do a simple word search engine. Is there an easy way
> to break up a sentence into individual words so that I can use it to compare
> without traversing through every character?
> Eg, something like this:
> from: "This is an example"
> to: ["This", "is", "an", "example"]

"This is an example".split()

William Dodé - flibuste.net

More information about the Python-list mailing list