Python/Python__works

lambda

말하는감자 2019. 10. 17. 22:46

tuples = [(1,'d'), (3,'a')]
test = sorted(tuples, key=lambda x :x[1])
print(test)

2번째 키값으로 정렬

'Python > Python__works' 카테고리의 다른 글

selenium tutorial  (0) 2019.11.08
python + shell script  (0) 2019.10.22
문자열 치환하기  (0) 2019.10.11
python으로 데이터 정리하기  (0) 2019.09.23
python response xml self-end tag issue  (0) 2019.09.20