Last active
August 29, 2015 14:19
-
-
Save darthShadow/9425ab6dfffff515298d 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
# Author : Anagh Kumar Baranwal | |
# Question : http://www.practicepython.org/exercise/2014/03/19/07-list-comprehensions.html | |
a = [1,4,9,16,25,36,49,64,81,100] | |
even_elements = [a[i] for i in range(0,len(a),2)] | |
print(even_elements) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment