Sorting Words by First Letter

  • Share this:

Code introduction


Sorts a list of words based on the first letter of each word


Technology Stack : Built-in function, lambda expression

Code Type : Sort function

Code Difficulty : Intermediate


                
                    
def a_sort_words(words):
    return sorted(words, key=lambda x: x[0])