Sorting Dictionary Keys Function

  • Share this:

Code introduction


This function takes a dictionary as an argument and returns a list of all keys in the dictionary, sorted.


Technology Stack : Dictionary

Code Type : Function

Code Difficulty :


                
                    
def aord_keys(d):
    return sorted(d.keys())                
              
Tags: