Menu Close

How to convert a string to lowercase in Python?

Sometimes, we want to convert a string to lowercase in Python.

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

How to convert a string to lowercase in Python?

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

For instance, we write:

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

And we see 'kilometer' logged.

Conclusion

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

Posted in Python, Python Answers