# Set

*noun*

say it: **“SET”** **/sɛt/**

A Python collection that holds each value only once and keeps no particular order, written in curly braces, such as {"ana", "ben"}.

## What is a **set** in Python?

A **set** is a collection with no duplicates and no particular order. It's the quickest way to remove repeats.

```python
visitors = ["ana", "ben", "ana", "cai"]
unique = set(visitors)
print(len(unique))  # 3
```

## In a sentence

- “Turning the visitor list into a **set** removed the repeated names.”
- “The **set** of tags kept "vegan" only once, however many times it was added.”

Level: Apprentice · [More Python terms at this level](https://www.ask-codey.com/glossary?category=python&level=2)

Updated: November 19, 2026

## In other subjects

- [Set in Data Structures](https://www.ask-codey.com/glossary/set-data-structures)
- [Set in Java](https://www.ask-codey.com/glossary/set-java)
- [Set in JavaScript](https://www.ask-codey.com/glossary/set-javascript)

Source: https://www.ask-codey.com/glossary/set
