Python Dictionary Length

Dictionary Length

To determine how many items (key-value pairs) a dictionary has, use the len() method.

Example

Print the number of items in the dictionary:

print(len(thisdict))