Mega Code Archive
Categories
/
Python Tutorial
/
Dictionary
Compare Dictionary Sizes
dict1 = {} dict2 = {'host': 'earth', 'port': 80} print len(dict1) > len(dict2)