I have a string string = 'some.value:so this-can be:any.thing, even some.value: too'
I want to strip out the 'some.value:'
on the left side.
My failed attempts:
>>> string.lstrip('some.value:')
' this-can be:any.thing, even some.value: too'
>>> string.replace('some.value:','')
'so this-can be:any.thing, even too'
>>> string.split(':')[1]
'so this-can be'
Expected output: so this-can be:any.thing, even some.value: too
I think the closest to my answer is using the lstrip()
. How can I tell the lstrip()
to strip exactly the whole phrase?
[!] NOT using any library is preferred!
Note: There is a similar question but the answer is not applicable to me.