Found in the basic-wrap.py program on pages 328-329. This program make extensive use of string slices. The slice (for both strings and lists) is a very powerful mechanism, that is probably under appreciated by beginning programmers. In this program, slices are used with a buffer to select either the initial or ending part of the buffer relative an index.
See also