Introduction Variables Data Types Numbers Casting Strings Boolean Operators Lists Tuples Dictionaries If-Else While Loops For Loops Functions Arrays Scope Modules User Input File Handling Python Maths

Welcome to the lesson on Modifying Strings

Python has a set of built-in methods that you can use on strings.

Upper Case

Some Examples: The upper() method returns the string in upper case:

syntax
Try it out yourself

Lower Case

Some Examples: The lower() method returns the string in lower case:

syntax
Try it out yourself

Replace String

Some Examples: The replace() method replaces a string with another string:

syntax
Try it out yourself

Split String

Some Examples: The split() method returns a list where the text between the specified separator becomes the list items:

syntax
Try it out yourself

End of Modifying Strings

You have learned Modifying Strings in simple terms. Let's proceed on to Concatenate Variables.

Next
Back To Top