8/18 Omitting Indices


#1


As shown, I have done the code and it prints out the odd numbers.
But still it says something is wrong.
Can someone tell me what exactly I've done wrong in my code.

Thank you


#2

no you have added end index range, as per instructions you only have to add stride :slightly_smiling:

my_list = range(1, 11) # List of numbers 1 - 10
print my_list

Add your code below!

print my_list[::2]


#3

Ashvin, this is the correct code.

y_list = range(1, 11) # List of numbers 1 - 10

# Add your code below!
my_list = range(1, 11) # List of numbers 1 - 10

# Add your code below!
print (my_list [::2])