[Tutor] Splitting on punctuation [was Tutor Digest, Vol 112, Issue 29]

Steven D'Aprano steve at pearwood.info
Mon Jun 10 09:57:31 CEST 2013


On 10/06/13 15:49, Mike Nickey wrote:
> Thank you Alan,
> I appreciate your help.
>
> The issue that I'm having is that split() doesn't seem to meet the need.
> The words such as "isn't" comes back as "isn't" rather then "isn" and "t".


Works for me.


py> "isn't".split("'")
['isn', 't']



P.S. please remember to change the subject line when replying to a digest. As the digest itself says:

>> When replying, please edit your Subject line so it is more specific
>> than "Re: Contents of Tutor digest..."


Also please trim your quoting. We don't need to see a copy of a 400 line digest when you are replying to a five line comment.



-- 
Steven


More information about the Tutor mailing list