[내일배움캠프] DAY61,62 - 실전프로젝트6,7

채은·2026년 2월 27일

DAY61


DAY62

코드카타

문자열 내 마음대로 정렬하기

def solution(strings, n):
    a = []
    for word in strings:
        a.append((word[n], word))
    a.sort()
    return [tuple[1] for tuple in a]

다른사람 풀이

def strange_sort(strings, n):
    return sorted(strings, key=lambda x: x[n])

strings를 정렬해. 근데 키는 단어의 n번째 알파벳으로 해
너무 깔끔하다👍


아티클스터디

https://velog.io/@chaen_99/Milking-Robots-Market-Size-Share-Growth-and-Industry-Analysis-By-Types-Pail-Milking-Robots-Pipeline-Milking-Robots-Plshy-Bone-Milking-Robots-Others-By-Applications-Farm-Dairy-Company-Others-Regional-Insights-and-Forecast-to-2035


회고

.

내일 할 거

profile
맨땅에 헤딩

0개의 댓글