points which gives ascii sorting for english loweror uppercasing all the strings compared produces more natural english language ordering normalizing is unlikely to be needed unless the strings are from external sources like files or network socketsbut even in these cases it probably shouldn' be done unless there is evidence that it is needed we can of course customize python' sort methods as we will see in the whole issue of sorting unicode strings is explained in detail in the unicode collation algorithm document (unicode org/reports/tr |slicing and striding strings piece # we know from piece # that individual items in sequenceand therefore individual characters in stringcan be extracted using the item access operator ([]in factthis operator is much more versatile and can be used to extract not just one item or characterbut an entire slice (subsequenceof items or charactersin which context it is referred to as the slice operator first we will begin by looking at extracting individual characters index positions into string begin at and go up to the length of the string minus but it is also possible to use negative index positions--these count from the last character back toward the first given the assignment "light ray"figure shows all the valid index positions for string [- [- [ [ [- [- [- [ [ [- [- [ [ [- [- [ [ [ figure string index positions negative indexes are surprisingly usefulespecially - which always gives us the last character in string accessing an out-of-range index (or any index in an empty stringwill cause an indexerror exception to be raised the slice operator has three syntaxesseq[startseq[start:endseq[start:end:stepthe seq can be any sequencesuch as liststringor tuple the startendand step values must all be integers (or variables holding integerswe have used the first syntax alreadyit extracts the start-th item from the sequence the second syntax extracts slice from and including the start-th itemup to and excluding the end-th item we'll discuss the third syntax shortly