Also called: deduplicate
Example
Converting the URLs to a set removed the duplicates.
In code
seen = set()
for url in urls:
if url in seen:
continue
seen.add(url)
set(a) & set(b) # in both
set(a) - set(b) # only in a
Related terms
Added 2026-11-30 · Last reviewed 2026-11-30