range() with len() for indexing into a string : Length : String PYTHON TUTORIALS


PYTHON TUTORIALS » String » Length »

 

range() with len() for indexing into a string


foo = 'abc'
for i in range(len(foo)):
   print foo[i]'(%d)' % i



Leave a Comment / Note


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


PYTHON TUTORIALS

 Navioo String
» Length