1. Sort By Multiple Keys
arr.sort(key = lambda x:(x[1],x[0]))
'PYTHON LANGUAGE' 카테고리의 다른 글
2D Array (0) | 2022.06.25 |
---|---|
ZIP (aggregate two iterators as list of tuples) (0) | 2022.06.20 |
ITERTOOLS (0) | 2022.06.20 |
DICTIONARY (0) | 2021.12.15 |
1. Sort By Multiple Keys
arr.sort(key = lambda x:(x[1],x[0]))
2D Array (0) | 2022.06.25 |
---|---|
ZIP (aggregate two iterators as list of tuples) (0) | 2022.06.20 |
ITERTOOLS (0) | 2022.06.20 |
DICTIONARY (0) | 2021.12.15 |