String Sort Function

  • Share this:

Code introduction


The function accepts a list of words as an argument and returns a sorted list, with the words ordered alphabetically.


Technology Stack : Built-in function sorted

Code Type : Function

Code Difficulty :


                
                    
def string_sort(words):
    """
    Sorts a list of words in alphabetical order.
    """
    return sorted(words)