Snippets tagged “negative-indices”
2 snippets use this tag.
- How do I get a substring of a string in Python?Python
To get a substring of a string in Python, you can use the string[start:end] notation.
- Understanding slicingPython
In Python, slicing refers to taking a subset of a sequence (such as a list, string, or tuple) by using indices to specify the start and end points of the slice.