정렬1(문제2)

송용진·2023년 7월 19일
0
tuple_list = [('apple', 3), ('banana', 2), ('cherry', 1), ('apple', 4), ('banana', 1)]
#1
# tuple_list.sort()
# print(tuple_list)

#2
# tuple_list.sort(key=lambda x: x[1])
# print(tuple_list)
profile
개발자

1개의 댓글

comment-user-thumbnail
2023년 7월 19일

글을 읽는 동안 많은 걸 배울 수 있었습니다.

답글 달기