0

I've so far discovered that in Python:
[space] < 0-9 < A-Z < a-z
when ordering strings.

But why is it that '[space] a' < 'a'? 
And why is it that 'abc' > 'ABCDEFG'?

How are strings ordered in Python?
Is there a flowchart that will help me understand this process?

user604803
  • 33
  • 1
  • 9

1 Answers1

1

Strings of the same type are ordered naively, with lower byte values or code points ordered before higher byte values or code points.

Ignacio Vazquez-Abrams
  • 776,304
  • 153
  • 1,341
  • 1,358