I am working on a scrapy project and was trying to parse my config
The string is attr_title
I have to strip 'attr_' and get title
. I used lstrip('attr_'), but getting unexpected results. I know lstrip
works out combinations and removes them, but having hard time understanding it.
In [17]: "attr.title".lstrip('attr.')
Out[17]: 'itle'
PS: I know there are multiple solutions for extracting string I am interested in understanding this.