> Python newbie: I've got this simple task working (in about ten > different ways), but I'm looking for the "favoured" and "most Python > like" way. > > Forwards I can do this > for t in listOfThings: > print t > > Now how do I do it in reverse?
Then general process would be to use the reversed() iterator: for t in reversed(listOfThings): print t Python provides a sorted() wrapper of the same non-in-place form. -tkc -- http://mail.python.org/mailman/listinfo/python-list