I'm working out of chapter 6 of Core Python
Programming (2nd Edition).  For one problem, I am
supposed to write a script that is the equivalent of
string.strip().  Obviously, using any version of
string.strip() defeats the purpose of the exercise.

I'm not sure how to proceed.  My biggest stumbling
block is how to detect the leading and trailing
whitespace.  If I wanted to remove all whitespace in a
string, I would probably break the string into its
individual components, cycle through the string,
detect the whitespace, and remove them.  Any hints?
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to