Case-Insensitive Dictionary Order Sorting Function

  • Share this:

Code introduction


This function takes a list of strings as input and returns a list of strings sorted in dictionary order. The sorting is case-insensitive.


Technology Stack : String, list, sorting

Code Type : Function

Code Difficulty : Intermediate


                
                    
def sort_words(words):
    return sorted(words, key=lambda w: w.lower())