Lexicographical Order Meaning In Python