[Tutor] code review please

Brian van den Broek broek at cc.umanitoba.ca
Wed Dec 28 23:23:12 CET 2005

Kent Johnson said unto the world upon 28/12/05 07:06 AM:
> Brian van den Broek wrote:
>>def punctuation_split(sequence):
>>     '''returns list of character sequences separating punctuation 
>>     for mark in punctuation:
>>         sequence = sequence.replace(mark, ' %s ' %mark)
>>     return sequence.split(' ')
> You should look at re.split().
> Kent

What, and have *2* problems? :-)

(But seriously, thanks for the pointer. As I was coding, I thought 
there must have been a better way drawing off of the library. See my 
other post for why I couldn't find it.)


Brian vdB

More information about the Tutor mailing list