CKTIS / Python
str.lower
Returns a lowercase Unicode copy of a string.
Version: Python 3.14; repository image, production runtime not attested
Syntax
s.lower()Returns a lowercase Unicode copy of a string.
Lowercasing alone does not make all caselessly equivalent strings equal; the German sharp s demonstrates the difference.
Straße becomes straße, while STRASSE becomes strasse. The sharp s remains distinct from ss after lowercasing, so the displayed equality is false. Case folding is intended for a caseless comparison.
assert "Maße".lower() != "MASSE".lower() and "Maße".casefold() == "MASSE".casefold()
Examples
print("Straße".lower())
print("Straße".lower() == "STRASSE".lower())
Result
straße False
Straße becomes straße, while STRASSE becomes strasse. The sharp s remains distinct from ss after lowercasing, so the displayed equality is false. Case folding is intended for a caseless comparison.