>>> a = "ab "
>>> a
'ab '
>>> rstrip(a)
Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
rstrip(a)
NameError: name 'rstrip' is not defined
>>> a.rstrip()
'ab'
>>> a
'ab '
>>> b = " a"
>>> b
' a'
>>> b.lstrip()
'a'
>>> c = " c "
>>> c
' c '
>>> c.strip
<built-in method strip of str object at 0x00000000035D67A0>
>>> c.strip()
'c'
>>>