Sometimes you may require to convert any string to lowercase (all letters). This tutorial will help to convert a string (any case) to lower case as shown in the below image.
Convert String to Lower Case
In the Python programming language you can use the lower()
method to convert any string to lower case. Here is the sample Python code to convert string to lowercase.
1 2 | >>> s = "HeLLo Python" >>> print(s.lower()) |
Outputhello python
Suggested reading
Some more examples of string conversions in Python.