object method(parametershas been illustrated so far with just the object type strbut it applies to all types later in the tutorial methods such as the following will be discussedif seq is listseq append(elementappends element to the end of the list if mydata is filemydata read(will read and return the entire contents of the file string indices string is sequence of smaller components (individual characters)and it is often useful to deal with parts of strings python indexes the characters in stringstarting from so for instancethe characters in the string 'computerhave indicescharacter index each index is associated with characterand you reference the individual characters much like in dictionary try the following (you can skip the comments that make the indices explicit enter in the shell 'computers[ [ [ you cannot refer directly to character that is not there indices only go to in the example above recall the len functionwhich gives the length of sequence it works on strings guess the following valueand test in the shelllen(sa common error is to think the last index will be the same as the length of the stringbut as you saw abovethat leads to an execution error if the length of some string is what is the index of its last characterwhat if the length is hopefully you did not count by ones all the way from the indices for string of length are the elements of the sequence range( )which goes from through - or the length of the string minus onewhich is - = or - in these examples sometimes you are interested in the last few elements of string and do not want to do calculations like this python makes it easy you can index from the right end of the string since positive integers are used to index from the frontnegative integers are used to index from the right endso the more complete table of indices for 'computergives two alternatives for each charactercharacter index index from the right end - - - - - - - - predict and test each individual linecontinuing in the shells[- [- [- it 'horselen(itit[- it[ stringspart iii