If the slice continues to the end of the sequence, you may simply leave out the last index : Slice : List PYTHON TUTORIALS


PYTHON TUTORIALS » List » Slice »

 

If the slice continues to the end of the sequence, you may simply leave out the last index


numbers = [12345678910]
numbers[-3:]



Leave a Comment / Note


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


PYTHON TUTORIALS

 Navioo List
» Slice