Omitting Indices (8/18)


#1

Can someone help me? I don't know what I'm doing wrong.
Here's my code:

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

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

Here's what it printed:

[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
None

Here's my error:

Oops, try again. Make sure to omit the appropriate indices in your list slice. Check the Hint if you need help!

Knowing what I did wrong could really help me understand.


#2

You have to change the stride the last of the start:finish:stride.

print (my_list [::2])

#3

Thanks that helped a lot


#4

I need to remember this better.


#5

Easy: :joy:

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

Add your code below!

print my_list[::2]`


#6

when it says odd numbers isn't that any number divisible by 3 and equal 0


#7

What about 5, 7,11,13 etc