like it is with lists an tuplesthe any(function returns true if even one key in dictionary has boolean value of true outputfalse outputany({true:false,"":""}true all()unlike the any(functionall(returns true only if all the keys in the dictionary have boolean value of true outputall({ : , :'',"": }false sorted()like it is with lists and tuplesthe sorted(function returns sorted sequence of the keys in the dictionary the sorting is in ascending orderand doesn' modify the original python dictionary dict ={ : , : , : but to see its effectlet' first modify dict nowlet' apply the sorted(function on it output[ as you can seethe original python dictionary wasn' modified dict this function returns the keys in sorted list to prove thislet' see what the type(function returns output