So with using the parameter reverse True with the sorted function we sort the dictionary in alphabetically or numerically in reverse from …