Alphabetical Sorting of String List

  • Share this:

Code introduction


The function takes a list of strings as an argument and returns a new list that is sorted alphabetically.


Technology Stack : Built-in function sorted()

Code Type : Function

Code Difficulty :


                
                    
def aord_list(items):
    """
    Sort a list of strings alphabetically.
    """
    return sorted(items)