Comparison operators work on strings too:
"apple" < "banana" # True (a comes before b)
"cat" == "cat" # True
"Dog" < "dog" # True (uppercase comes before lowercase)
Python compares strings lexicographically (dictionary order), character by character. The comparison uses Unicode values, so uppercase letters come before lowercase.
For case-insensitive comparison, convert both to the same case:
name1.lower() == name2.lower()
This is useful when comparing user input, which might have inconsistent capitalization.