▲ | zahlman 3 hours ago | |
Both .casefold() and .lower() in Python use the default Unicode casing algorithms. They're unicode-aware, but locale-naive. So .lower() also works for this purpose; the point of .casefold() is more about the intended semantics. See also: https://stackoverflow.com/questions/19030948 where someone sought the locale-sensitive behaviour. |