Yah...I am learning four different languages presently in four different platforms 😅 Im very new to solo learn... haven't even been a week since I started learning all these.....its such a huge community here😅..pardon me for such absurd question 😅
HonFu that maybe the very reason which was playing with my brain forcing me to think that a should come first😅...I was justifying my point so confidently that if a is bigger, why is A getting placed first? Lol...😆
Strings are stored as ASCII Unicode, sort() function recognizes "A" as ASCII hex 0041 and "a" as ASCII hex 0061. Hence "A" will be before "a" , as in 0041 hex before 0061 hex.
"a" > "A" is true since 61 hex>41 hex or if you prefer decimal 97 dec > 65 dec
Yes I do know it...what I meant in my question is that although it shows that a is bigger than A...then why is A getting placed first when I am sorting the list?...it should sort in ascending order right? And according to the Ascii value the sort is correct and thats what I was expecting...but then why is it returning true when im comparing weather a is > A or not?...this is my main point of confusion.
My main concern is about the condition returning true.