<jupyter_start><jupyter_text>2020년 3월 17일 화요일 SW Expert Academy - 7701. 염라대왕의 이름 정렬 문제 : https://swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AWqU0zh6rssDFARG&categoryId=AWqU0zh6rssDFARG&categoryType=CODE 블로그 : https://somjang.tistory.com/entry/SWExpertAcademy-7701-%EC%97%BC%EB%9D%BC%EB%8C%80%EC%99%95%EC%9D%98-%EC%9D%B4%EB%A6%84-%EC%A0%95%EB%A0%AC-Python  첫번째 시도<jupyter_code>count = 1

loop_num = int(input())

for i in range(loop_num):
    input_num = int(input())
    input_str_list = []
    
    for i in range(input_num):
        string = str(input())
    
        input_str_list.append((string, len(string)))
        
#     print(input_str_list)
    input_str_list = list(set(input_str_list))
    sorted_str_list = sorted(input_str_list, key = lambda x : (x[1], x[0]))
#     print(sorted_str_list)

    print("#{}".format(count))
    for i in range(len(sorted_str_list)):
        print(sorted_str_list[i][0])
    count = count + 1<jupyter_output>2
5
my
name
is
ho
seok
[('my', 2), ('name', 4), ('is', 2), ('ho', 2), ('seok', 4)]
[('ho', 2), ('is', 2), ('my', 2), ('name', 4), ('seok', 4)]
#1
ho
is
my
name
seok
12
s
a
m
s
u
n
g
j
j
a
n
g
[('s', 1), ('a', 1), ('m', 1), ('s', 1), ('u', 1), ('n', 1), ('g', 1), ('j', 1), ('j', 1), ('a', 1), ('n', 1), ('g', 1)]
[('a', 1), ('g', 1), ('j', 1), ('m', 1), ('n', 1), ('s', 1), ('u', 1)]
#2
a
g
j
m
n
s
u
{'fraction_non_alphanumeric': 0.2365747460087083, 'fraction_numerical': 0.05878084179970972, 'mean_word_length': 4.051282051282051, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '298750', 'license': 'MIT', 'n_tokens_mistral': 707, 'n_tokens_neox': 670, 'n_words': 146, 'path': 'DAY 001 ~ 100/DAY040_[SW Expert Academy] 7701번 염라대왕의 이름 정렬 (Python).ipynb', 'repo_name': 'SOMJANG/CODINGTEST_PRACTICE', 'size': '1378'}