0
How can you explain this? How do their orders differ?
>>>"Aa"<"aa" True >>>"A"<"a" True
3 Respostas
+ 13
This is because of their ASCII number, try to paste the following line in your console:
print( ord('A'), ord('a') )
You will see that the ASCII number of 'A' is lower than the ASCII number of 'a'.
This is why =====> 'A' < 'a' = true
0
Thanks!
- 1
I don't exactly understand that, I think that python only counts one character:
>>>"Aa"<"aa" # One character.
True
>>>"A"<"a" # One character.
True