indexing we will often want to pick out individual characters from string python uses square brackets to do this the table below gives some examples of indexing the string ='pythonstatement result description [ first character of [ second character of [- last character of [- second-to-last character of the first character of is [ ]not [ remember that in programmingcounting usually starts at not negative indices count backwards from the end of the string common error suppose ='pythonand we try to do [ there are only six characters in the string and python will raise the following error messageindexerrorstring index out of range you will see this message again remember that it happens when you try to read past the end of string slices slice is used to pick out part of string it behaves like combination of indexing and the range function below we have some examples with the string ='abcdefghijindexletters code result description [ : cde characters at indices : abcde first five characters [ fghij characters from index to the end [- ij last two characters sabcdefghij entire string [ : : bdf characters from index to by twos :- jihgfedcba negative step reverses the string