"Christopher Spears" <[EMAIL PROTECTED]> wrote 

> I'm not sure how to proceed.  My biggest stumbling
> block is how to detect the leading and trailing
> whitespace.  

Use indexing.
Recall str[-1] is the last character
str[0] is the first...

Try using a while loop. 
Or maybe two?

And strings have an isspace method...

HTH,

-- 
Alan Gauld
Author of the Learn to Program web site
http://www.freenetpages.co.uk/hp/alan.gauld

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to