Menu Close

How to convert a string to lower case in Python?

Sometimes, we want to convert a string to lower case in Python.

In this article, we’ll look at how to convert a string to lower case in Python.

How to convert a string to lower case in Python?

To convert a string to lower case in Python, we can call the string’s lower method.

For instance, we write:

s = "Kilometer"
print(s.lower())

We call s.lower to return "Kilometer" with all lower case characters.

Therefore, 'kilometer' is printed.

Conclusion

To convert a string to lower case in Python, we can call the string’s lower method.

Posted in Python, Python Answers