Skip to content

Instantly share code, notes, and snippets.

@mpolden
Last active August 29, 2015 14:01
Show Gist options
  • Save mpolden/642e13f3bde27c6e9494 to your computer and use it in GitHub Desktop.
Save mpolden/642e13f3bde27c6e9494 to your computer and use it in GitHub Desktop.
def filter_iterable(key, iterable):
filtered = {}
for v in iterable:
if v[key] not in filtered:
filtered[v[key]] = v
return filtered.values()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment