How to get the index of a substring contained in a str python?