Skip to content · ⁨본문 바로가기⁩

Remove duplicates · ⁨중복 제거⁩

English

Remove duplicates

Return a new list that keeps each value only once, in the order it first appeared: [1, 1, 2, 3, 3, 1] becomes [1, 2, 3].

A set answers "have I seen this already?" in one fast step. Keep a set of seen values and a list for the result, and only append a value the first time you meet it.

한국어

중복 제거

새로운 리스트를 반환하여 각 값이 처음(first) 등장한 순서대로 오직 한 번만 남게 합니다: [1, 1, 2, 3, 3, 1]은 [1, 2, 3]이 됩니다.

set은 "이것을 이미 봤는가?"라는 질문에 한 번의 빠른 단계로 답합니다. 보았던 값들의 집합(set)과 결과를 위한 목록을 유지하고, 값을 처음 만났을 때만 추가하십시오.

Log in or create account · ⁨로그인 또는 계정 만들기⁩

IGCSE, A-Level & AP