Last active
September 10, 2016 18:02
-
-
Save kentquirk/a19b3ed7b268b0cf437b8719408fe732 to your computer and use it in GitHub Desktop.
Concatenation and tuples
This file contains hidden or 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
output = dict() | |
for element in input: | |
output[element["owner"]] = output.get(element["owner"], ()) + (element["pet"],) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment