Python lstrip cutting error problem

problem description

python3 environment. Problems encountered in using the strip () method
Why is there a cutting error

>>> s = "https://img.codeshelper.com/upload/img/2021/04/07/ceadsmhi1ox15763.jpg"
>>> s.lstrip("http://img.17dm.com/juren/manhua/")
""
>>> s.lstrip("http://img.17dm.com/juren/")
"anhua/1/1.jpg"
>>> s.lstrip("http://img.17dm.com/")
"juren/manhua/1/1.jpg"
>>> s.lstrip("http://img.17dm.com/").lstrip("juren/manhua")
"1/1.jpg"
Apr.07,2021

The usage of

lstrip is as follows: str. Lstrip ([chars])
lstrip will delete all possible strings that appear after you, knowing that the string does not exist in that list.

for example, str.lstrip ('say')
str is sequentially stripped of the characters beginning and ending in the array, until the characters are in the non-array

.

here is a concrete example:

>>> '   spacious   '.lstrip()
'spacious   '
>>> "AABAA".lstrip("A")
'BAA'
>>> "ABBA".lstrip("AB") -sharp both AB and BA are stripped
''
>>> "ABCABBA".rstrip("AB")
'ABC'
>>> "ABCABBA".lstrip("AB")
'CABBA'
Menu