Steps in list question, Python beginner

Posted by shin on Stack Overflow See other posts from Stack Overflow or by shin
Published on 2010-05-29T11:31:35Z Indexed on 2010/05/29 11:32 UTC
Read the original article Hit count: 221

Filed under:
|

Why does not the following code output 10, 8, 6, 4, 2?

>>> numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
>>> numbers[:1:-2]
[10, 8, 6, 4]

© Stack Overflow or respective owner

Related posts about python

Related posts about beginner