Created
September 10, 2016 19:25
-
-
Save kentquirk/e62ba1ead9ebad0ad0730debd5be340b to your computer and use it in GitHub Desktop.
Python one-liner (bad idea!)
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
| # oneline | |
| output = dict([(o, [e["pet"] for e in input if e["owner"] == o]) for o in set((i["owner"] for i in input))]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment