Created
October 1, 2015 21:02
-
-
Save israelst/d2eb21e930dfa6e9fb0e to your computer and use it in GitHub Desktop.
Return a list of unique keys from a list of dicts.
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
def keys_from_dicts(dicts): | |
all_keys = sum(map(dict.keys, dicts), []) | |
return list(set(all_keys)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment