Created
August 19, 2018 16:33
-
-
Save StrikingLoo/74fda7ea7fa01ea508161b306d2dffa3 to your computer and use it in GitHub Desktop.
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
| some_list = [1,2,3,4,5,6,7,8,9] | |
| only_even = [n for n in some_list if n%2==0] | |
| def even(n): | |
| return n%2 == 0 | |
| only_even_prettier = [n for n in some_list if even(n) ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment