Mega Code Archive

 
Categories / Python Tutorial / Buildin Function
 

Sorted() and reversed()

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