Skip to content

Instantly share code, notes, and snippets.

Last active Mar 16, 2018
What would you like to do?
def function_name (collection, k):
result = {}
for x in collection:
prop = x[k]
if prop not in result:
result[prop] = []
return result
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment