Convert String to Lowercase in Python

To convert a string to lowercase in Python, you can use one of the built-in string.lower() or string.casefold() methods. The string.lower() method will convert all uppercase characters and return a copy of str with all characters converted to lowercase. The string.lower() method will return the original string if there are no uppercase characters. The string.casefold() method also converts the string to lowercase but compared to the string.lower() method, the string.casefold() method is more aggressive. This means that the string.casefold() method will convert more characters to lowercase the string.lower(). You can also manually convert a string to lowercase using the "for loop". In this Python Lowercase String example, we use the string.lower() method. Below are more examples of converting a string to lower case with detailed descriptions. Click Execute to run Python Lowercase String Example online and see the result.
Loading...