ABSTRACT

Indexing is a standard feature of most programming languages. Java, C#, C++, and C all have syntax like E[i] whereby an item with index i can be referenced in E (which might be a character string, an array of numbers, etc.). Python goes further: it is possible to refer to “chunks” of a sequence instead of indexing items one at a time. This feature is called slicing a sequence. Other techniques, like split and join, make it easy to take apart strings and assemble lists of strings into new strings.