How do I lowercase a string in Python?

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()

Leave a Comment