Skip to content

Instantly share code, notes, and snippets.

@deeTEEcee
Created August 21, 2017 21:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deeTEEcee/85984504c0d3255ac8a5848c20fd7aa1 to your computer and use it in GitHub Desktop.
Save deeTEEcee/85984504c0d3255ac8a5848c20fd7aa1 to your computer and use it in GitHub Desktop.
Python functions that could be useful
# surprised that python does not have something like this in the iterator class or something.
def get_subset_from_dict(dict_obj, *keys):
return dict((k, dict_obj[k]) for k in keys)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment