Created
April 15, 2016 10:08
-
-
Save scarecrow1123/49914eb0ae984b8cd201daf71f7fc2a2 to your computer and use it in GitHub Desktop.
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
"""takes a list x and returns a list with odd integers or elements with even index""" | |
[i for idx,i in enumerate(x) if (type(i) is int) and (i%2 !=0 or idx%2==0)] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment