Popular recipes tagged "difference" but not "metric"http://code.activestate.com/recipes/tags/difference-metric/2012-11-01T10:30:58-07:00ActiveState Code RecipesList comparison, difference and more using set & frozenset (Python) 2012-11-01T10:30:58-07:00Scott S-Allenhttp://code.activestate.com/recipes/users/4181178/http://code.activestate.com/recipes/578310-list-comparison-difference-and-more-using-set-froz/ <p style="color: grey"> Python recipe 578310 by <a href="/recipes/users/4181178/">Scott S-Allen</a> (<a href="/recipes/tags/compare/">compare</a>, <a href="/recipes/tags/contain/">contain</a>, <a href="/recipes/tags/difference/">difference</a>, <a href="/recipes/tags/lambda/">lambda</a>, <a href="/recipes/tags/list/">list</a>, <a href="/recipes/tags/remove/">remove</a>, <a href="/recipes/tags/set/">set</a>, <a href="/recipes/tags/union/">union</a>). </p> <p>Python has a powerful suite of tools for comparing lists by way of sets and frozensets. Here are a few examples and conveniences that many newcomers, even a few seasoned developers, are unaware.</p> Diff Two Dictionaries (Python) 2009-02-05T08:35:07-08:00Michael Shepanskihttp://code.activestate.com/recipes/users/4169100/http://code.activestate.com/recipes/576644-diff-two-dictionaries/ <p style="color: grey"> Python recipe 576644 by <a href="/recipes/users/4169100/">Michael Shepanski</a> (<a href="/recipes/tags/dictionary/">dictionary</a>, <a href="/recipes/tags/diff/">diff</a>, <a href="/recipes/tags/difference/">difference</a>). </p> <p>Diff two dictionaries returning just the differences. If an item is not found, it is represented by the string "&lt;KEYNOTFOUND&gt;". If there is a better way, please share. :)</p>