오픈채팅방 (1) 썸네일형 리스트형 [ 프로그래머스 ] 오픈채팅방 / 제출 1 / def change(array, uid): return updated_array def solution(records): answer = [] name_dict = {} for record in records: record = record.split() if len(record) == 3: oper, uid, name = record else: # leave인 경우 oper, uid = record if oper == 'Enter': answer.append(uid+"님이 들어왔습니다.") if uid not in name_dict: name_dict[uid] = name elif uid in name_dict and name_dict[uid] != name: name_dict[uid] .. 이전 1 다음