how to separate words from a string?
Benjamin Kaplan
benjamin.kaplan at case.edu
Sun May 11 21:05:34 EDT 2008
On Sun, May 11, 2008 at 8:15 PM, David Anderson <zerty.david at gmail.com>
wrote:
> Hi, how can I separate words from a sentence in a string? Like the
> java.String.split method
> I need something that gets an string "This is a sentence", and return to em
> a list["This","is","a","sentence"]
> Can anyone help?
> Thx
>
You should probably look in the docs before posting here. Python strings
also have a split method, that does the same thing as in java.
http://docs.python.org/lib/string-methods.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20080511/67e36d2d/attachment-0001.html>
More information about the Python-list
mailing list