# Documentation | Operation | Result | Notes | |-----------|-----------------------------|-------| | `s[i]` | *i*th item of *s*, origin 0 | (3) | 3. If *i* or *j* is negative, the index is relative to the end of sequence *s*: `len(s) + i` or `len(s) + j` is substituted. But note that `-0` is still `0`. We can add a note: If the sequence is empty or *i* is outside the sequence range, `IndexError` will be raised. <!-- gh-linked-prs --> ### Linked PRs * gh-134977 * gh-135258 * gh-135259 <!-- /gh-linked-prs -->
Documentation
s[i]len(s) + iorlen(s) + jis substituted. But note that-0is still0.We can add a note: If the sequence is empty or i is outside the sequence range,
IndexErrorwill be raised.Linked PRs
s[i]#134977s[i](GH-134977) #135258s[i](GH-134977) #135259