be careful remember what the initial index isstring slices it is also useful to extract larger pieces of string than single character that brings us to slices try this expression using slice notationcontinuing in the shells[ : note that [ is the first character past the slice the simplest syntax for slice of string issstartindex pastindex this refers to the substring of starting at index startindex and stopping just before index pastindex warningit confuses many people that the index after the colon is not the index of the final character in the slice the second index is past the end of the slice predict and try each line individually in the shells[ : [ : if you omit the first indexthe slice starts from the beginning if you omit the second indexthe slice goes all the way to the end predict and try each line individually in the shells[: [ : [:predict and try each line individually in the shellword 'programword[ : word[ :- word[ :word[ : word[: word[ :python evaluates slices in more forgiving manner than when indexing single characters in sliceif you give an index past limit of where it could bepython assumes you mean the actual end predict and try each line individually in the shellword[: word[ : enter slice expression using the variable word from above that produces 'graa useful string method that uses the ideas of indices and slices is find syntax options for find method with string ss find(subs find(substarts find(substartendreturn the integer index in the string of the beginning of the first complete occurrence of the substring sub if sub does not appear inside sreturn - the value - would be an impossible result if sub were foundso if - is returnedsub must not have been found if parameters start and end are not included in the parameter listthe search is objects and methods