Sorting Words List Function

  • Share this:

Code introduction


This function takes a list of words as an argument and returns the sorted version of that list.


Technology Stack : list, sorted

Code Type : Function

Code Difficulty : Intermediate


                
                    
def sort_words(words):
    """
    排序传入的单词列表,并返回排序后的列表。
    """
    return sorted(words)                
              
Tags: