[issue25979] String functions lstrip are not working properly when you have escape sequence
Ethan Furman
report at bugs.python.org
Tue Dec 29 21:39:09 EST 2015
Ethan Furman added the comment:
lstrip() works by removing any of the characters in its argument, in any order; for example:
'catchy'.lstrip('cat')
# 'hy'
'actchy'.lstrip('tac')
# 'hy'
is stripping, from the left, all 'c's and all 'a's and all 't's -- not just the first three, and order does not matter.
The docs: https://docs.python.org/3/library/stdtypes.html?highlight=lstrip#str.lstrip
----------
nosy: +ethan.furman
resolution: -> not a bug
stage: -> resolved
status: open -> closed
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25979>
_______________________________________
More information about the Python-bugs-list
mailing list