table method continued description index( [,start [,stop]]returns the smallest where [ ]== start and stop optionally specify the starting and ending index for the search insert( ,xinserts at index pop([ ]returns the element and removes it from the list if is omittedthe last element is returned remove(xsearches for and removes it from reverse(reverses items of in place sort([key [reverse]]sorts items of in place key is key function reverse is flag that sorts the list in reverse order key and reverse should always be specified as keyword arguments strings python provides two string object types byte strings are sequences of bytes containing -bit data they may contain binary data and embedded null bytes unicode strings are sequences of unencoded unicode characterswhich are internally represented by -bit integers this allows for , unique character values although the unicode standard supports up to million unique character valuesthese extra characters are not supported by python by default insteadthey are encoded as special twocharacter ( -bytesequence known as surrogate pair--the interpretation of which is up to the application as an optional featurepython may be built to store unicode characters using -bit integers when enabledthis allows python to represent the entire range of unicode values from + to + all unicode-related functions are adjusted accordingly strings support the methods shown in table although these methods operate on string instancesnone of these methods actually modifies the underlying string data thusmethods such as capitalize() center()and expandtabs(always return new string as opposed to modifying the string character tests such as isalnum(and isupper(return true or false if all the characters in the string satisfy the test furthermorethese tests always return false if the length of the string is zero the find() index() rfind()and rindex(methods are used to search for substring all these functions return an integer index to the substring in in additionthe find(method returns - if the substring isn' foundwhereas the index(method raises valueerror exception the replace(method is used to replace substring with replacement text it is important to emphasize that all of these methods only work with simple substrings regular expression pattern matching and searching is handled by functions in the re library module the split(and rsplit(methods split string into list of fields separated by delimiter the partition(and rpartition(methods search for separator substring and partition into three parts corresponding to text before the separatorthe separator itselfand text after the separator many of the string methods accept optional start and end parameterswhich are integer values specifying the starting and ending indices in in most casesthese values lib fl ff