>>> x = range(1,10) >>> print x [1, 2, 3, 4, 5, 6, 7, 8, 9] >>> x[::2] [1, 3, 5, 7, 9] >>> x[1::2] [2, 4, 6, 8]
I tried it, and it really works. Tried doing some googling, can't find much information on this... '::' thing. Can anyone explain to me what it does please? Thanks.

New Topic/Question
Reply



MultiQuote


|