Is there a way to convert a string from uppercase, or even part uppercase to lowercase?
For example, "Kilometers" → "kilometers".
The toLowerCase() method converts a string to lowercase letters. The toLowerCase() method does not change the original string.
. lower() is a built-in Python method primarily used for string handling. The . lower() method takes no arguments and returns the lowercased strings from the given string by converting each uppercase character to lowercase.
The lower() method returns a string where all characters are lower case. Symbols and Numbers are ignored.
Use .lower()
- For example:
s = "Kilometer" print(s.lower())
The official 2.x documentation is here: str.lower()
The official 3.x documentation is here: str.lower()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With