Python Dictionary Length
Dictionary Length
To determine how many items (key-value pairs) a dictionary has, use the len()
method.
ExampleGet your own Python Server
Print the number of items in the dictionary:
print(len(thisdict))
Try it Yourself »