splitlines([keepends] isidentifier( startswith(prefix [start [end]] islower( strip([chars] isnumeric( swapcase( isprintable( title( isspace( translate(maps istitle( upper( isupper( zfill(widths join(iterableas you can seethere are quite few string methodsand we don' have space to cover them allsee python' library manual or reference texts for all the fine points to help you get startedthoughlet' work through some code that demonstrates some of the most commonly used methods in actionand illustrates python text-processing basics along the way string method exampleschanging strings ii as we've seenbecause strings are immutablethey cannot be changed in place directly the bytearray supports in-place text changes in and laterbut only for simple -bit types we explored changes to text strings earlierbut let' take quick second look here in the context of string methods in generalto make new text value from an existing stringyou construct new string with operations such as slicing and concatenation for exampleto replace two characters in the middle of stringyou can use code like thiss 'spammys [: 'xxs[ : 'spaxxyslice sections from butif you're really just out to replace substringyou can use the string replace method insteads 'spammys replace('mm''xx' 'spaxxyreplace all mm with xx in the replace method is more general than this code implies it takes as arguments the original substring (of any lengthand the string (of any lengthto replace it withand performs global search and replace'aa$bb$cc$ddreplace('$''spam''aaspambbspamccspamddstring methods