
clp2 at rebertia
Nov 3, 2009, 11:42 PM
Post #2 of 2
(344 views)
Permalink
|
|
Re: how to remove the punctuation and no need words from paragraphs
[In reply to]
|
|
On Tue, Nov 3, 2009 at 1:44 PM, kylin <huili.song [at] gmail> wrote: > I want to remove all the punctuation and no need words form a string > datasets for experiment. > > I am new to python, please give me some clue and direction to write > this code. The `replace` method of strings should get you pretty far (just replace unwanted stuff with the empty string): http://docs.python.org/library/stdtypes.html#str.replace Cheers, Chris -- http://blog.rebertia.com -- http://mail.python.org/mailman/listinfo/python-list
|