len() returns the total number of items, that is, key-value pairs : Length : Dictionary PYTHON TUTORIALS


PYTHON TUTORIALS » Dictionary » Length »

 

len() returns the total number of items, that is, key-value pairs


dict2 = {'name': 'earth', 'port': 80}
print dict2
print len(dict2)



Leave a Comment / Note


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


PYTHON TUTORIALS

 Navioo Dictionary
» Length