strings string is sequence string is sequence of characters you can access the characters one at time with the bracket operatorfruit 'bananaletter fruit[ the second statement extracts the character at index position from the fruit variable and assigns it to the letter variable the expression in brackets is called an index the index indicates which character in the sequence you want (hence the namebut you might not get what you expectprint(lettera for most peoplethe first letter of "bananais " "not "abut in pythonthe index is an offset from the beginning of the stringand the offset of the first letter is zero letter fruit[ print(letterb so "bis the th letter ("zero-th"of "banana""ais the th letter ("one-th")and "nis the th ("two-th"letter you can use any expressionincluding variables and operatorsas an indexbut the value of the index has to be an integer otherwise you getletter fruit[ typeerrorstring indices must be integers