[Tutor] Strip?

Hansen, Mike Mike.Hansen at atmel.com
Wed Apr 30 16:18:28 CEST 2008

strip(  	s[, chars])
    Return a copy of the string with leading and trailing characters
removed. If chars is omitted or None, whitespace characters are removed.
If given and not None, chars must be a string; the characters in the
string will be stripped from the both ends of the string this method is
called on. Changed in version 2.2.3: The chars parameter was added. The
chars parameter cannot be passed in earlier 2.2 versions. 

What characters are included as whitespace characters? Spaces? Tabs?
Newlines? For some reason, I was reading whitespace as just spaces.


More information about the Tutor mailing list