[Tutor] creating the equivalent of string.strip()

Alan Gauld alan.gauld at btinternet.com
Mon Oct 1 13:20:05 CEST 2007


"Andrew James" <aijames at exemail.com.au> wrote

> string containing a single space ' ' but even using s[-1].isspace() 
> I
> lose punctuation marks. Any idea why that's happening?

care to show us what you are doing?

>>> ';'.isspace()
False

So puntuation should not show up as true...

Alan G.




More information about the Tutor mailing list