+ 2
Can't understand the description
Greater than and smaller than operators can also be used to compare strings lexicographically (the alphabetical order of words is based on the alphabetical order of their component letters).
3 Answers
+ 5
You're using Python, right?
Lexicographically means the way words are alphabetically ordered based on the alphabetical order of their letters.
For example:
print("a" > "b")
# Outputs False because "b" comes after "a" in the alphabet, so "b" is greater than "a"
print("a" < "b")
# Outputs True
print("ab" > "ac")
# Outputs False because "c" comes after "b" in the alphabet, so it makes the whole word "ac" greater than the word "ab"
+ 3
just didn't understand the order and whether complete words could be used, now I know thanks to Pao
0
You can't understand the description of lexicographically?