Created
February 27, 2014 14:32
-
-
Save tru/9251204 to your computer and use it in GitHub Desktop.
Two list comprehensions in a dict comprehension? Why not!
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
{k: v.strip() for (k, v) in [l.split(':') for l in [l for l in str(data).split("\\r\\n")[1:]] if ":" in l]} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment