2021 KAKAO BLIND RECRUITMENT - 신규 아이디 추천
import string import re def solution(new_id): answer = '' new_id = new_id.lower() symbols = string.punctuation.replace('-','').replace('_','').replace('.','') for symbol in symbols: new_id = new_id.replace(symbol,"") new_id = re.sub('\.\.+','.',new_id) new_id = new_id.strip('.') if new_id == '': new_id = 'a' if len(new_id) > 15: new_id = new_id[:15] new_id = new_id.strip('.') while len(new_id) <..
2022.04.18