cmp() is a function that we can use to compare two dictionaries.
The dictionary comparison is done in the following order using cmp():
First, the size of the elements is checked, then the keys are compared and then values are compared.
Based on the size, key and then value comparison,
a) If the dictionary_one is greater than dictionary_two, then 1 is returned.
b) If the dictionary_one is less than dictionary_two, then -1 is returned.
c) If the dictionary_one is equal to dictionary_two, then 0 is returned.