Difference between casefold function and lower() function in python

  When I learned python by myself and saw the string function, I saw two functions with similar functions, the casefold and lower functions. The main function of these two functions is to lowercase the elements in the string, but the most important difference is that the lower function only supports characters in the ascill table, while casefold supports many different kinds of languages. For example, β, lower function shows the original form and casefold can show his lowercase --ss

The picture is transferred from the blog of nicolas_z923

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325171362&siteId=291194637