Compare dictionaries : Compare dictionary : Dictionary PYTHON TUTORIALS


PYTHON TUTORIALS » Dictionary » Compare dictionary »

 

Compare dictionaries


dict1 = {'abc': 123}
dict2 = {'abc': 456}
dict3 = {'abc': 12398.637}
dict4 = {'xyz': 123}
print dict1 < dict2
print (dict1 < dict3and (dict1 < dict4)
print (dict2 < dict3and (dict2 < dict4)
print dict3 < dict4



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo Dictionary
» Compare dictionary