using None as an index has the same effect as a missing index : Index : String PYTHON TUTORIALS


PYTHON TUTORIALS » String » Index »

 

using None as an index has the same effect as a missing index


s = 'abcde'
for i in [None+ range(-1, -len(s), -1):
    print s[:i]



Leave a Comment / Note


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


PYTHON TUTORIALS

 Navioo String
» Index