String Comparison

Python
Author

Imad Dabbura

Published

May 27, 2024

Strings in Python are compared using lexicographical order of their character code. For ASCII characters, uppercase letters are considered smaller than lowercase letters.

print('A' < 'a')  # True