[EMAIL PROTECTED]:
> list[rowindex][colomindex]
> I want to sort on the second colom as first (and as
> second sortfield the first colom).

A good way, in Python 2.5:

>>> from operator import itemgetter
>>> a = [[1, 2], [3, 1], [2, 5], [7, 1]]
>>> a.sort(key=itemgetter(1, 0))
>>> a
[[3, 1], [7, 1], [1, 2], [2, 5]]

Bye,
bearophile
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to