rstrip
William King
wjk at wjk.mv.com
Sat Oct 30 00:20:25 EDT 1999
Just managed to download and install Python on my PC and was
trying a few things to start out learning the language... so I guess
that makes me a NEWBIE.... Anyhow:
#made a string with leading tabs
x = " Test"
#used rstrip(x) to eliminate leading tabs (whitespace)
import string
string.rstrip(x)
#resulted in
\011\011Test
#lstrip will take away tabs (whitespace) and strip will do same
#but it appears that rstrip does not on Windows 95
#is this a bug? or do I have to do something to redefine whitespace?
More information about the Python-list
mailing list