Python documentation from http://docs.python.org/library/string.html :
string.lstrip(s[, chars])
Return a copy of the string with leading characters removed. If chars is omitted or
None
, whitespace characters are removed. If given and notNone
, chars must be a string; the characters in the string will be stripped from the beginning of the string this method is called on."
Python 3.1.2 (r312:79360M, Mar 24 2010, 01:33:18)
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
Type "copyright", "credits" or "license()" for more information.
>>> import string
>>> x = 'Hi'
>>> string.lstrip(x,1)
Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
string.lstrip(x,1)
AttributeError: 'module' object has no attribute 'lstrip'
>>>
What am I missing here?