Python Compare Strings Lexicographically Order