Revese and skip : Slice : List PYTHON TUTORIALS


PYTHON TUTORIALS » List » Slice »

 

Revese and skip


s = 'abcdefgh'
print s[::-1]            # think of it as 'reverse'
print s[::2]             # think of it as skipping by 2



Leave a Comment / Note


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


PYTHON TUTORIALS

 Navioo List
» Slice