![[BOJ 1181][백준 1181번] 단어 정렬 (파이썬 풀이) 포스팅 썸네일 이미지](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FvYfGN%2Fbtq6lYvqdAl%2Fo3SrfiTsQvMxhz8qOpH1r1%2Fimg.png)
Algorithm/Baekjoon
[BOJ 1181][백준 1181번] 단어 정렬 (파이썬 풀이)
https://www.acmicpc.net/problem/1181 🤔 문제 설명 및 입출력 ✍ 접근 방법 앞서 풀었던 10814번과 완전 동일한 유형의 문제이다. 참고 : https://spookyjelly.tistory.com/15 1순위 : len(x) / 2순위 : x 로 두고 sort with lambda를 사용하여 정렬 후, 출력한다. 👨💻 소스 코드 파이썬 N = int(input()) words = [] for _ in range(N): words.append(input()) words = list(set(words)) # 길이 순 정렬 / 2순위 : 사전 순 정렬 words = sorted(words,key= lambda x : [len(x),x]) for word in words: pr..