[Tutor] creating the equivalent of string.strip()
Kent Johnson
kent37 at tds.net
Mon Oct 1 13:22:25 CEST 2007
Andrew James wrote:
> I've gone ahead and created a script that does this, however it also
> strips punctuation. I was originally just comparing each character to a
> string containing a single space ' ' but even using s[-1].isspace() I
> lose punctuation marks. Any idea why that's happening?
Hmmm, I seem to have misplaced my glasses of distant screen reading +3
Australia is a bit far for me to look over you shoulder. Maybe you
should just post your code here so we can take a look.
Kent
More information about the Tutor
mailing list