dict1 = {'abc': 123} dict2 = {'abc': 456} dict3 = {'abc': 123, 98.6: 37} dict4 = {'xyz': 123} print dict1 < dict2 print (dict1 < dict3) and (dict1 < dict4) print (dict2 < dict3) and (dict2 < dict4) print dict3 < dict4