omlet_stuff = {"egg":2, "mushroom":5, "pepper":1, "cheese":1, "milk":1} fridge_contents = {"egg":10, "mushroom":20, "pepper":3, "cheese":2, "milk":2} stuff = omlet_stuff.keys() for food in stuff: print "adding %d %s to the mix" % (stuff[food],food)