Question:

Write a program to sort ‘GlobalSQA’ lexiographically

Program:

Explanation:

The lexicographic or lexicographical order (also known as lexical order, dictionary order, alphabetical order or lexicographical product) is a generalization of the way the alphabetical order of words is based on the alphabetical order of their component letters. The sorted function sorts it for you.

Output:

 

Leave a Reply