Comparisons

==, !=, <, <=, > and >= work as you expect on numbers. Python lets you chain them: 0 <= i < len(s) means 0 <= i and i < len(s). It reads like maths and is a nice touch in interview code.

Different types: 1 == 1.0 is True, 1 == "1" is False, and 1 < "2" raises TypeError. True == 1 is True, because bool is a kind of int.

Strings compare one character at a time by code point. Every capital letter comes before every lowercase letter, so "Zebra" < "apple". To sort without caring about case, use a key: sorted(words, key=str.lower).

Run it, then add "Banana" to the list.