I've got a list of Python objects which I would like to sort by an attribute of the objects themselves. The list is as follows:
>>> nt
[<Tag: 128>, <Tag: 2008>, <Tag: <>, <Tag: actionscript>, <Tag: addresses>,
<Tag: aes>, <Tag: ajax> ...]
Each object has a count:
>>> nt[1].count
1L
I want the list be sorted by number of counts descending.Can anyone help?