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)
글을 읽는 동안 많은 걸 배울 수 있었습니다.
글을 읽는 동안 많은 걸 배울 수 있었습니다.