Sort Strings In Lexicographical Order Python