Python has string.find() and string.rfind() to get the index of a substring in a string. I'm wondering whether there is something ... ... <看更多>
Search
Search
Python has string.find() and string.rfind() to get the index of a substring in a string. I'm wondering whether there is something ... ... <看更多>
... <看更多>
word[42] # the word only has 6 characters Traceback (most recent call last): File "<stdin>", line 1, in <module> IndexError: string index out of range. ... <看更多>