Looking for the documentation of str order comparsion

>>> "a" < "b"
True

I suppose their ASCII codes are being compared. I would like to take a look at the documentation for str.__lt__() to study its exact behaviour. (E.g. its behaviour when Unicode is involved.)
The documentation for str does not talk about it. And help(str.__lt__) is not helpful.

It is documented under the Expressions section:

Strings (instances of str) compare lexicographically using the numerical Unicode code points (the result of the built-in function ord()) of their characters.

2 Likes