Last active
July 19, 2019 08:00
-
-
Save eyaltrabelsi/1200d59cfb3c579a620af2c85d3eaaa2 to your computer and use it in GitHub Desktop.
Python-tricks list comprehension
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
>>> m = [x ** 2 for x in range(5)] | |
>>> m | |
[0, 1, 4, 9, 16] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
probably meant
m = [x ** 2 for x in range(5)]