Re: Order a matrix by columns with priority

2017-05-31 Thread Peter Otten
1024m...@gmail.com wrote: > i have the following matrix: > catch = [['fc', 2, 12, 2], > ['abcd', 1, 2, 0], > ['ab', 1, 0, 0], > ['cf', 1, 13, 0], > ['fc', 1, 14, 0], > ['f', 1, 11, 0]] > > and i want this matrix to be ordered by the third columns firstly, when > the values of the third colum

Order a matrix by columns with priority

2017-05-31 Thread 1024masi
i have the following matrix: catch = [['fc', 2, 12, 2], ['abcd', 1, 2, 0], ['ab', 1, 0, 0], ['cf', 1, 13, 0], ['fc', 1, 14, 0], ['f', 1, 11, 0]] and i want this matrix to be ordered by the third columns firstly, when the values of the third column are equals, by the second column. i just