Created
October 4, 2015 14:09
-
-
Save poros/2082c143b11bab98dc83 to your computer and use it in GitHub Desktop.
List/dict/set comprehensions
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
[x**2 for x in (2,4,6)] | |
{x: x**2 for x in (2, 4, 6)} | |
{x for x in 'abracadabra' if x not in 'abc'} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment