#python #anaconda #jupyter-notebook #visual-code #html #css #javascript #http 제목2022-1-00 기출 7번 문제2023-12-06 15:44작성자수강생정답 처리된 답에서는 겹치는 value가 있을 때 그에 대한 key를 모아놓고 나중에 제거하는 방식을 사용하였습니다. 오답 처리된 답에서는 겹치는 value에 대해 그때마다 딕셔너리에서 제거하였습니다. 어디서 차이가 발생한 것인가요?#7 오답 def removeCustomerByName(self, customerName): count = 0 for key, value in self.customerInform.items(): if customerName == value: self.customerInform.pop(key) count += 1 if count != 0: return self.customerInform else: return -1#7 정답 def removeCustomerByName(self, customerName): count = 0 keyList = [] for key, value in self.customerInform.items(): if customerName == value: keyList += [key] count += 1 if count != 0: for i in keyList: self.customerInform.pop(i) return self.customerInform else: return -1 목록수정삭제답변글쓰기 댓글 [1] 댓글작성자(*)비밀번호(*)내용(*) 댓글 등록 더보기이전기출질문이요da2023-12-06다음채점 프로그램 질문 수강생2023-12-06 Powered by MangBoard | 워드프레스 쇼핑몰 망보드