how to use len function with dictonary in python code example Example: python get size of dictionary d = {"foo": "bar"} size = len(d)