Hello. Could you please add a note to QUIZ: COMPARISON OPERATORS, why ‘python’>‘Python’ is True?
Hello @Catherine
string comparison in Python is case-sensitive
And Python compares strings lexicographically, using the constituent characters based on their ASCII or Unicode code points.
In your case, “python” begins with the letter ‘p’ , whereas "Python"
begins with the uppercase letter ‘P’
>>> ord('p')
112
>>> ord('P')
80
2 Likes