튜플 (코딩테스트, 프로그래머스)
문제 https://programmers.co.kr/learn/courses/30/lessons/64065 코딩테스트 연습 - 튜플 "{{2},{2,1},{2,1,3},{2,1,3,4}}" [2, 1, 3, 4] "{{1,2,3},{2,1},{1,2,4,3},{2}}" [2, 1, 3, 4] "{{4,2,3},{3},{2,3,4,1},{2,3}}" [3, 2, 4, 1] programmers.co.kr 나의 코드 def solution(s): answer = [] s=s[2:-2] s=s.split("},{") s=sorted(s,key=lambda x:len(x)) for i in range(len(s)): s[i]=s[i].split(",") for i in range(len(s)-1,0,-1): f..
2022. 1. 25.