A step size of two will include only every other element of the interval between the start and the end : Slice : List PYTHON TUTORIALS


PYTHON TUTORIALS » List » Slice »

 

A step size of two will include only every other element of the interval between the start and the end


numbers = [12345678910]

print numbers[0:10:2
print numbers[3:6:3]



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo List
» Slice