iterable type 의 list 인 경우 정렬 기준을 key를 통해 지정할 수 있다.
iterable type
list
key
예를 들어,
Data.sort(key=lambda x:(x[1], x[0]))
라고 하면 Data는 각 요소들의 두 번째 인덱스 값을 첫 순위로, 첫 번째 인덱스 값을 차 순위로 정렬된다.
https://docs.python.org/ko/3/howto/sorting.html