https://stackoverflow.com/questions/19454286/python-strip-a-string-from-index
strip string:
>>> mystr = 'foo7bar'
>>> mystr[:mystr.index('7')]
'foo'
>>>
https://stackoverflow.com/questions/9572490/find-index-of-last-occurrence-of-a-substring-in-a-stringlast indexstring.rindex('bla')first indexstring.index
No comments:
Post a Comment