Lets say you have a dictionary named mydict, then
print(len(mydict.keys()))or
print(len(mydict))
>>> zz = {'a':123, 'b':456, 'c':789} >>> len(zz) 3