Posted By

silviud on 05/11/11


Tagged


Versions (?)

Reverse loop on list


 / Published in: Python
 

  1. >>> a
  2. ['one', 'two', 'three']
  3. >>> for i in a[::-1]:
  4. ... print i
  5. ...
  6. three
  7. two
  8. one

Report this snippet  

You need to login to post a comment.