sorted() and reversed() : reversed « Buildin Function « Python Tutorial






s = ['They', 'stamp', 'them', 'when', "they're", 'small']
for t in reversed(s):
  print t,
sorted(s)








13.41.reversed
13.41.1.Reversed and Sorted Iteration
13.41.2.sorted() and reversed()