목록압축 (1)
Head vs breakz

def solution(msg): word_list =['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'] status = True total = True count = 0 val_count = 0 answer = [] for i in range(len(msg)): for j in range(len(msg),0,-1): if msg[i:j] in word_list and status ==True : answer.append(word_list.index(msg[i:j])+1) word_list.append(msg[i:j+1]) count += j-i if j-i > 1: ..
Head/Code
2020. 5. 7. 21:11