count( counts how many times the string occurs in find( returns the index of the first occurrence of the substring in sand - if is not in rfind( same as findbut starts from the end of (the "rin rfind stands for reverses index( same as findbut raises an exception (see if is not in rindex( same as indexbut starts from the end of lower(converts all uppercase letters in to lowercase replace(oldnewreplaces all occurrences of the string old in with the string new rstrip(removes trailing white space from split(dsplits using as delimiter returns list of substrings of for examplethe value of 'david guttag plays basketballsplit('is ['david''guttag''plays''basketball'if is omittedthe substrings are separated by arbitrary strings of whitespace characters (spacetabnewlinereturnand formfeedfigure some methods on strings dictionaries objects of type dict (short for dictionaryare like lists except that "indicesneed not be integers--they can be values of any immutable type since they are not orderedwe call them keys rather than indices think of dictionary as set of key/value pairs literals of type dict are enclosed in curly bracesand each element is written as key followed by colon followed by value for examplethe codemonthnumbers {'jan': 'feb': 'mar': 'apr': 'may': :'jan' :'feb' :'mar' :'apr' :'may'print 'the third month is monthnumbers[ dist monthnumbers['apr'monthnumbers['jan'print 'apr and jan are'dist'months apartwill print the third month is mar apr and jan are months apart the entries in dict are unordered and cannot be accessed with an index that' why monthnumbers[ unambiguously refers to the entry with the key rather than the second entry the method keys returns list containing the keys of dictionary the order in which the keys appear is not defined sofor examplethe code print monthnumbers keys(might print [ 'mar''feb' 'apr''jan''may'