python get size of a dict code example Example: python get size of dictionary d = {"foo": "bar"} size = len(d)