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 <[email protected]>
<http://bugs.python.org/issue25979>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com