There is list like "list of the lists": [[1,2,3],[4,5,6],[7,8,9],[11,
12,13],[14,15,16]]
We can sort it by follow script:
import operator
...
myList.sort(key=operator. itemgetter(3))
We can sort it by follow script:
import operator
...
myList.sort(key=operator.
If we can see cortege of number of "columns" in itemgetter (for example: (0,1)), there is sorting order in this cortege.
Комментариев нет:
Отправить комментарий