0

I noticed that in Python we have:

  • '0' < 'A' < 'a'
  • '0' < '00'

As far as I understand, there are multiple possible lexicographical orderings of characters and strings, so I assume this is one type specifically.

Does this lexicographic ordering have a name? and is it in any way specific to Python?

Josh
  • 11,979
  • 17
  • 60
  • 96
  • 2
    The exact name you are looking for is [Unicode](https://home.unicode.org/basic-info/faq/). – Jongware Apr 17 '20 at 17:50
  • Thanks @usr2564301, what about string length? Are shorter strings < longer strings? – Josh Apr 17 '20 at 19:06
  • Yes. Try it. Also logically: *any* character is "greater than" no character. There is nothing weird in this in Python, it's a generally accepted concept. – Jongware Apr 17 '20 at 19:49

0 Answers0