There are two string methods for this, find() and index() . The difference between the two is what happens when the search string isn't ... ... <看更多>
Search
Search
There are two string methods for this, find() and index() . The difference between the two is what happens when the search string isn't ... ... <看更多>
... <看更多>
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. ... <看更多>