Negative step size : Slice : List PYTHON TUTORIALS


PYTHON TUTORIALS » List » Slice »

 

Negative step size


numbers = [12345678910]

print numbers[8:3:-1
print numbers[10:0:-2
print numbers[0:10:-2
print numbers[::-2
print numbers[5::-2
print numbers[:5:-2]



Leave a Comment / Note


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


PYTHON TUTORIALS

 Navioo List
» Slice