+ 1
What is the logic behind string comparisons, why ("H">"c") is False and ("H">"C") is True? How does the case sensitivity works?
2 Antworten
+ 9
It checks for ASCII values.Google it.
+ 9
Capital letter have ASCII values from 65-90, and small alphabets have values from 97-122.
Then H=72
C=68
c=99
Therefore 'H'>'c' is false but 'H'>'c' is true.
Hope this helps.