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/post104865.html#post104865
sneekula
Nearly a Posting Maven
2,427 posts since Oct 2006
Reputation Points: 961
Solved Threads: 212