You have to read up on the slicing operator in the Python Manual.
Generally you can slice a sequence with [start: end: step]
By default start=0, end=len(seq), step=1
step=-1 goes from the end to the beginning of the sequence, hence your reverse.
For some nice slicing examples see post #4 at;
http://www.daniweb.com/forums/post10...tml#post104865 Last edited by sneekula; Sep 13th, 2009 at 3:22 pm.
Reputation Points: 961
Solved Threads: 211
Nearly a Posting Maven
Offline 2,413 posts
since Oct 2006