string indexing each character in string has numbered position called an index you can access the character at the nth position by putting the number between two square brackets ([]immediately after the stringflavor "fig pieflavor[ 'iflavor[ returns the character at position in "fig pie"which is wait isn' the first character of "fig pie"in python--and in most other programming languages--counting always starts at zero to get the character at the beginning of stringyou need to access the character at position flavor[ 'fimportant forgetting that counting starts with zero and trying to access the first character in string with the index results in an by-one error off-by-one errors are common source of frustration for beginning and experienced programmers alikethe following figure shows the index for each character of the string "fig pie"