Can you define lexographical order w.r.t python | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
0

Can you define lexographical order w.r.t python

12th Oct 2019, 3:42 PM
harsh
harsh - avatar
2 ответов
+ 3
Take two words. If first letter of word1 is smaller (comes earlier in the alphabet) than the first letter of word2, the test ends, and word1 is smaller (comes earlier in a dictionary). And vice versa. If they are equal, the second letters are checked. And so forth.
12th Oct 2019, 3:59 PM
HonFu
HonFu - avatar
+ 1
HonFu example please
12th Oct 2019, 4:16 PM
harsh
harsh - avatar