Answers for "[1::2] python"

6

:: in python

#[start:end:step]
>>> range(10)[::2]
[0, 2, 4, 6, 8]
Posted by: Guest on April-27-2020
-1

[1::2] python

>>> L = range(10)
>>> L[::2]
[0, 2, 4, 6, 8]
Posted by: Guest on October-21-2020

Python Answers by Framework

Browse Popular Code Answers by Language