In "Python Dictionaries" (Page 4) of "Beginning Python for Bioinformatics" either the Python Interpreter is designed wrong or your example is at:
String slicing is similar to string indexing. Instead of retrieving a single character, string slicing allows us to retrieve sections of characters from a starting position up to, but not including, an ending position. The syntax is s[i:j], where i is the starting position and j is the ending position. So s[0:3] returns a string containing the characters in index positions 0, 1, and 2.
>>> s = 'CCGGAAGAGCTTACTTAG'
If i is the starting position and j is the ending position then specifying s[0:3] yields index positions 0, 1, 2, 3 not 0, 1, 2; likewise with s[3:6] s[6:9] s[9:12]. Relative to starting postion zero (0), index position 12 could not exist since 0-11 represents 12 positions.
sorry for the delay in responding to you. Thanks for bringing that to our attention. I will forward your observations to Patrick O'Brian who wrote this article. You can also contact him with any other observations at:
Customer Service Rep,