Created
August 21, 2017 21:00
-
-
Save deeTEEcee/85984504c0d3255ac8a5848c20fd7aa1 to your computer and use it in GitHub Desktop.
Python functions that could be useful
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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