Skip to content

Instantly share code, notes, and snippets.

@thezerobit
Created July 3, 2014 16:43
Show Gist options
  • Save thezerobit/8a423846a230c55e53ae to your computer and use it in GitHub Desktop.
Save thezerobit/8a423846a230c55e53ae to your computer and use it in GitHub Desktop.
some python
def values_in(keys, dict_):
Nothing = object()
vals = (dict_.get(key, Nothing) for key in keys)
return [x for x in vals if x is not Nothing]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment